sumif returns blank if all cells blank
Put this in G2
=IF(AND(B2="",C2="",D2="",E2="",F2=""),"",SUM(B2:F 2))
It will give you blank only if ALL cells are blanks.
You have mentioned that you want the result in E2... that will be a circular
reference as SUM(B2:F2) includes E2 also.
If you DO want it in E2 then use
=IF(AND(B2="",C2="",D2="",F2=""),"",B2+C2+D2+F2)
"Heliocracy" wrote:
Hi all, I have rows in which columns b-f may be blank or have numerical
values in them, and in column e of the same row I need to be able to sum
these numbers if there are any, but remain blank if ALL of columns b-f are
blank. The problem I'm having with:
{=IF(ISBLANK(B2:F2),"",SUM(B2:F2))} in cell e2
is that it returns "" if ANY of the cells in b2:f2 are blank. In other
words, I need a formula in e2 that sums b2:f2 if any of those cells are not
blank, but returns blank if all cells in b2:f2 are blank. If all cells in
b2:f2 contain zeroes, then e2 should contain a zero, but if all cells in
b2:f2 are blank, e2 should be blank.
Thanks in advance for your help.
|