+ Reply to Thread
Results 1 to 2 of 2

Formula that will leave cell blank if cell is blank

  1. #1
    jimtmcdaniels
    Guest

    Formula that will leave cell blank if cell is blank

    I have a formula adding & subtracting the number values in 3 different cells
    into a fourth cell, however I need to change the formula so that if one of
    the cells is blank, the fourth cell sum will show blank too.

    I think a simple IF formula will work, but I don't know how to tell the
    formula if the cell is blank.

    example: A1 =Sum(A2-A3+A4)

    I've tried something like: IF(A2=blank,"",sum(A2-A3+A4)
    but I get an error.



  2. #2
    K Dales
    Guest

    RE: Formula that will leave cell blank if cell is blank

    blank cells are equal to a zero length string:
    =IF(A2="","",A2-A3+A4)
    (note: the SUM function was redundant, here)
    Another way, if you want to check all three cells, recognizing that COUNT
    only counts numbers:
    =IF(COUNT(A2:A4)<3,"",A2-A3+A4)

    --
    - K Dales


    "jimtmcdaniels" wrote:

    > I have a formula adding & subtracting the number values in 3 different cells
    > into a fourth cell, however I need to change the formula so that if one of
    > the cells is blank, the fourth cell sum will show blank too.
    >
    > I think a simple IF formula will work, but I don't know how to tell the
    > formula if the cell is blank.
    >
    > example: A1 =Sum(A2-A3+A4)
    >
    > I've tried something like: IF(A2=blank,"",sum(A2-A3+A4)
    > but I get an error.
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1