+ Reply to Thread
Results 1 to 3 of 3

Problem leaving cell blank with double logic formula

  1. #1
    Registered User
    Join Date
    04-22-2010
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    10

    Problem leaving cell blank with double logic formula

    I am guessing I am probably doing this the wrong way but I think what i am doing should work. I am trying to tally some numbers from a group of cells and if that number is greater than 4 another cell will result in 1 point (or the number 1) if it is not greater than 4 than I want the cell in question to remain blank. Easy enough and I have done that here.

    =IF(SUM(J8:J10)>4,1,"")

    My problems is that I want to add to that formula because if the sum of the cells in question is greater than 9 I want 3 more points added to the results cell resulting with the total 4.

    =IF(SUM(J8:J10)>4,1,"")+IF(SUM(J8:J10)>9,3,"")

    It works but THE PROBLEM IS when the cells in question are not greater than 4 the results cell is not blank it shows "###"

    Why is it not blank like it is in the simple first formula?
    How can I create a formula that shows the results of a blank cell if the sum in question is less than 5, results in 1 if the sum is greater than 4, and results in 4 if the sum is greater than 9.


    Thanks for any help

    Heali

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Problem leaving cell blank with double logic formula

    A formula Null ("") is in reality a 0 length text string and can not be coerced to number (whereas a true blank would be 0).

    So perhaps:

    =IF(SUM(J8:J10)>9,4,IF(SUM(J8:J10)>4,1,""))

    (edit: removed LOOKUP given Null return required / preferred)

  3. #3
    Registered User
    Join Date
    04-22-2010
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Problem leaving cell blank with double logic formula

    Brilliant!
    Thank you DonkeyOte. I spent over two hours trying to fix that.

+ 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