return blank

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

I am using sumif functions who return "zero" if criteria
is not found. How can I let the function return a blank
instead of "0"?


Thanks
 
Hi John
try
=IF(SUMIF(...),SUMIF(...),"")

Note: this works only if you sum positive values. If your range could
also contain negative values a zero as result could be a valid result.
 
Hi

You could use custom number formatting (like General;General; ;General), or
uncheck Tools / Options / View Zero values
 
Hi Frank

Thanks for your reply.
What is the diff. betw.
=IF(SUMIF(...),SUMIF(...),"") and >=IF(SUMIF(...)
=0,"",SUMIF(...))?

Regards,
 
Hi John
the second formula uses the fact, that TRUE is represented by 1 (or
=1) and FALSE by 0.
So the formula
=IF(SUMIF(....),SUMIF(...),"")
is a shortcut of
=IF(SUMIF(...)>0,.....)
 
Back
Top