Results 1 to 4 of 4

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

  1. #1

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



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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.

  2. #2
    Try this

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

  3. #3

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

    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.

  4. #4
    What did you expect, the forum is called Excel Guru?

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •