SOLVED

Sumif or Sumifs help

Copper Contributor

I want to count and add the value in cell B:B if cell A:A is red and D:D is today

red25 8/9/2019 
blue27   
red65 9/9/2019 
totalred

90

8/9/2019

25

 blue

27

8/9/2010

0

  

 

 

 

 

8 Replies
best response confirmed by iceice (Copper Contributor)
Solution
=SUMIF(A:A,"red",B:B) sums all cells in column B where column A equals "red".

@iceice 

=SUMIFS(B1:B3,A1:A3,"red") should work for you.

Thank you, it say array are different size.
Thank you :) it say array are different size.
All arguments in the function must point to the same number of rows.

@Jan Karel Pieterse yey, i got it. Thank you so much

what if i want to add another condition if cell C:C is equal to green?
That would mean adding the condition to the formula:
=SUMIFS(B1:B3,A1:A3,"red",C1:C3,"green")
Note that BOTH conditions must be met, if you want to sum them if either condition is met:
=SUMIFS(B1:B3,A1:A3,"red")+SUMIFS(B1:B3,C1:C3,"green")
1 best response

Accepted Solutions
best response confirmed by iceice (Copper Contributor)
Solution
=SUMIF(A:A,"red",B:B) sums all cells in column B where column A equals "red".

View solution in original post