SUMIF with blank cells criteria -- can it be done?

jasonconlon

Board Regular
Joined
Mar 14, 2002
Messages
80
I'm trying to sum a range of cells (C1:C100) where the corresponding cells (A1:A100) are not blank. Unfortunately because of the format for the criteria which requires operators to be noted with quotation marks, I cannot use "" to represent blank cells. I have tried the formula
=SUMIF(A1:A100,"<>0",C1:C100)
but the zero-value is clearly not equal to an empty cell value, as it is not giving the correct answer unless I specifically change those empty cells to actual zeros.

Any ideas?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Yes, it does, it does.. :)

I thought criteria is supposed to a logical expression. How come "=" work when "=0" doesn't for checking whether the cell is 0?

Thanks again, Aladin
 
Upvote 0
Yes, it does, it does.. :)

Great.

I thought criteria is supposed to a logical expression. How come "=" work when "=0" doesn't for checking whether the cell is 0?

SumIf does not coerce empty cells into 0's, so a =0 is unusable. Just a "=" test picks out the empty cells (but not non-blanks), and "<>" the non-empty cells.

Thanks again, Aladin

You are welcome. Thanks for providing feedback.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top