+ Reply to Thread
Results 1 to 7 of 7

formula returning incorrect blanks

  1. #1
    michelleelaine@hotmail.com
    Guest

    formula returning incorrect blanks

    Problem:

    When I enter the following equation into a cell with a blank in cell
    CH12 or CH13 I get the correct answer (the sum of the cells with
    numbers in them) but when there is a blank in cell CH14 I get an
    incorrect answer (in the form of a clank cell).

    =IF(AND(ISNUMBER(CH12:CH14)),SUM(CH12:CH14),"")

    Does anyone have any suggestions?

    Thanks,
    Elaine


  2. #2
    Duke Carey
    Guest

    RE: formula returning incorrect blanks

    Well, this is REALLY weird. If I put this formula in a brand new spreadsheet

    =IF(AND(ISNUMBER(A1:A3)),SUM(A1:A3),"")

    It returns "".

    After entering a number in A1 - no change
    After entering another nunber in A2 - no change
    After entering another nunber in A3 - I get the sum - as the formula would
    suggest

    Now if I select either A1 or A2 and Clear All, the sum remains but changes
    to reflect the remaining values. This doesn't look right because of the AND()

    Now I enter new values in A1 & A2 the sum updates

    But, if I Clear All on A3 only, the sum disappears.

    SO....THIS DOESN'T BEHAVE CONSISTENTLY, Right?




    "michelleelaine@hotmail.com" wrote:

    > Problem:
    >
    > When I enter the following equation into a cell with a blank in cell
    > CH12 or CH13 I get the correct answer (the sum of the cells with
    > numbers in them) but when there is a blank in cell CH14 I get an
    > incorrect answer (in the form of a clank cell).
    >
    > =IF(AND(ISNUMBER(CH12:CH14)),SUM(CH12:CH14),"")
    >
    > Does anyone have any suggestions?
    >
    > Thanks,
    > Elaine
    >
    >


  3. #3
    michelleelaine@hotmail.com
    Guest

    Re: formula returning incorrect blanks

    yep, you have it. I am so frustrated and have been working on this for
    a week now. Thanks for trying!


  4. #4
    Duke Carey
    Guest

    RE: formula returning incorrect blanks

    Maybe that should be an array formula. It works perfectly then. Still don't
    understand why it wirks as it does when not entered as an arry

    Elaine -

    The formula as written wants to sum those cells only if they ALL are
    numbers, which is inconsistent with what your message says you want. If you
    want the sum of ANY numbers, just use

    =SUM(CH12:CH14)

    If you really want a sum ONLY when all 3 cells have numbers, then the
    formula must be entered as an array, ie., by pressing Ctrl-Shift-Enter


    "Duke Carey" wrote:

    > Well, this is REALLY weird. If I put this formula in a brand new spreadsheet
    >
    > =IF(AND(ISNUMBER(A1:A3)),SUM(A1:A3),"")
    >
    > It returns "".
    >
    > After entering a number in A1 - no change
    > After entering another nunber in A2 - no change
    > After entering another nunber in A3 - I get the sum - as the formula would
    > suggest
    >
    > Now if I select either A1 or A2 and Clear All, the sum remains but changes
    > to reflect the remaining values. This doesn't look right because of the AND()
    >
    > Now I enter new values in A1 & A2 the sum updates
    >
    > But, if I Clear All on A3 only, the sum disappears.
    >
    > SO....THIS DOESN'T BEHAVE CONSISTENTLY, Right?
    >
    >
    >
    >
    > "michelleelaine@hotmail.com" wrote:
    >
    > > Problem:
    > >
    > > When I enter the following equation into a cell with a blank in cell
    > > CH12 or CH13 I get the correct answer (the sum of the cells with
    > > numbers in them) but when there is a blank in cell CH14 I get an
    > > incorrect answer (in the form of a clank cell).
    > >
    > > =IF(AND(ISNUMBER(CH12:CH14)),SUM(CH12:CH14),"")
    > >
    > > Does anyone have any suggestions?
    > >
    > > Thanks,
    > > Elaine
    > >
    > >


  5. #5
    michelleelaine@hotmail.com
    Guest

    Re: formula returning incorrect blanks

    Hi,

    I had figured it needed to be an array as well but it still produces
    the same result.

    I unfortunately cannot use a simple sum equation either. I have
    stepwise calculations on raw
    data and I have to ensure that true zero's are kept in while empty
    cells (with no raw data) are continuously considered blank (not
    zero's). For the example above I cannot use a simple sum function
    (which would work if I was only missing 1 or 2 cells of the range)
    because if all three cells are missing/blank in the previous
    calculation, they have to return a blank, not a zero.

    Thanks,
    Elaine


  6. #6
    michelleelaine@hotmail.com
    Guest

    Re: formula returning incorrect blanks

    I must be using the wrong formula - what I want to do is have a formula
    that will sum any cells within the range that have a number but if ALL
    of the cells are empty I need the result to be blank.


  7. #7
    michelleelaine@hotmail.com
    Guest

    Re: formula returning incorrect blanks

    in case anyone has a similar problem, I got this suggestion from Dave
    Peterson and it works perfectly!

    =if(count(sh12:ch14)>0,sum(ch12:ch14),"")


    the >0 can be replaced with whatever number you want before a summation

    is done (i.e. 1 value, 2 values, etc. present)


+ 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