Exclude empty cells from a formula and sum the contents of those cells.

Calcasieu

New member
Joined
Mar 8, 2012
Messages
2
Reaction score
0
Points
0
I am embarrassed to ask such a simple question, but here goes. I want to set up a formula to check cells A1 through F1 and if all those cells are empty, leave the cell empty. but if any of those cells is not empty, to sum those entries and if the sum is zero to insert the test OK and if the sum of those entries is not zero, to insert the test Not OK. Here is my feudal attempt that did not work.

=IF(A1:F1)"","",IF(SUM(A1:F1)=0;"OK";"Not OK"))

Any help will be appreciated.
 
Try this

=IF(COUNTIF(A1:F1,"<>"),IF(SUM(A1:F1),"Not OK","OK"),"")
 
Thanks Bob,

Your suggestion works fine with Microsoft Office and Libre Office, but produces Err:508 in Open Office. No big deal, I can use Libre. Thanks for your help.
 
What did you expect, the forum is called Excel Guru?

Don't do Open Office, don't want to do Open Office.
 
Back
Top