What function is MS Excel do you use to add "if?"

Column B is things like "Maintenance," "Water," "Energy," etc.

I want to make a cell that adds everything that has "Water" next to it.

I tried =COUNTIF(B:B,"Water"), but that just counts them. =SUMIF doesn't seem to work even though I thought it would.

I forgot to add: The values are in column "A" and the category (Water, Maintenance), etc. is in Column B, so I want to add all the values that are in column A.
 
Last edited:
Back
Top