PDA

View Full Version : Solved: If formula result is Zero then Blank



JimS
02-23-2009, 01:49 PM
I have the following formula, which works fine, but is it possible to modify it so that if the result of the formula is equal to 0 (zero) then enter a Blank in the cell?

=IF($B10="","",SUMPRODUCT((TEXT(WEEKDAY(Timecard!$A$4:$A$53),"ddd")=D$9)*(Timecard!$D$4:$D$53=$B10)*(Timecard!$C$4:$C$53)))

Because I'm using the first condition to determine if the formula should even be executed ($B10="",""), I'm not sure how to make a resulting 0 a Blank.

Thanks for any and all help...

Jim

mdmackillop
02-23-2009, 02:31 PM
You can nest another If statement
=IF(A1="","",IF(B1*C1=0,"",B1*C1))

Bob Phillips
02-23-2009, 04:05 PM
=IF(OR($B10="",SUMPRODUCT((TEXT(WEEKDAY(Timecard!$A$4:$A$53),"ddd")=D$9)*(T imecard!$D$4:$D$53=$B10)*(Timecard!$C$4:$C$53))=0),"",SUMPRODUCT((TEXT(WEEKDAY(Timecard!$A$4:$A$53),"ddd")=D$9)*(T imecard!$D$4:$D$53=$B10)*(Timecard!$C$4:$C$53)))

or better put the calc in another cell and use

=IF(OR($B10="",C10=0),"",C10)

JimS
02-24-2009, 07:48 AM
Thanks...