SOLVED

How to avoid a #value error due to source cell being blank but containing another formula

Copper Contributor

Hi, I am using the following formula:

=IF(AND(D3="",E3="",F3=""),"",D3+E3+F3)

to sum three cells but to return a blank (rather than 0) if all source cells are empty. This works fine in other areas of my spreadsheet where all source cells are either empty or contain numbers, however, in this case, cell D3 contains a very simple =IF(D2="","",(D2)) formula, which when this returns a blank (because D2 is empty), I get the #value error.

 

Any tips on how to avoid this error, please?

 

Thanks in advance,

Antony

2 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@amkdil Change the formula to:

 

=IF(AND(D3="",E3="",F3=""),"",SUM(D3:F3))

 

SUM ignores the text value "" to may result from the formula in D3. 

Thank you so much for your quick and helpful response!
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@amkdil Change the formula to:

 

=IF(AND(D3="",E3="",F3=""),"",SUM(D3:F3))

 

SUM ignores the text value "" to may result from the formula in D3. 

View solution in original post