+ Reply to Thread
Results 1 to 5 of 5

Nested If Statement

Hybrid View

  1. #1
    Registered User
    Join Date
    01-25-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Nested If Statement

    Help Please!!! What I am trying to do is make one continuious statement. This is what I had (and it works) but now need to add to it.

    NEW SETUP:
    Min Max Temp 1
    7.4 25 17

    =IF(ISBLANK(H9),"Incl.",IF(AND(ISBLANK(D9),ISBLANK(F9),ISNUMBER(H9)),"Ref.",IF(AND(ISBLANK(D9),ISBLANK(F9),H9="pass"),"P",IF(OR(AND(ISNUMBER(D9),ISNUMBER(H9),ISNUMBER(F9),H9>=D9,F9>=H9),AND(ISBLANK(D9),ISNUMBER(E9),ISNUMBER(F9),F9>=H9),AND(ISNUMBER(D9),ISNUMBER(H9),ISBLANK(F9),H9>=D9)),"P","FAIL"))))


    But I need help adding the soft min and max. I am getting an error stating that I have too many nested if statements.
    It should say " "=Pass, "R" when Temp1 is blank, "I" when all is blank, "F" when less than Min and greater than Max, "W" when they are greater than or equal to the soft max but less than the max and less than or equal to the soft min but greater than the min. and P when all else are false. I am close but I have tried so many different ways. Thanks.

    SETUP:
    Min Soft Min Max Soft Max Temp 1
    7.4 8 25 30



    =IF(ISBLANK(H10),"I",IF(AND(ISBLANK(D10),ISBLANK(F10),ISBLANK(E10),ISBLANK(G10),ISNUMBER(H10)),"R",IF(AND(ISBLANK(D10),ISBLANK(F10),ISBLANK(E10),ISBLANK(G10),H10="pass"),"",IF(OR(AND(ISNUMBER(D10),ISNUMBER(H10),ISNUMBER(F10),H10>=D10,F10>=H10),IF(AND(ISNUMBER(E10),ISNUMBER(G10),H10>=E10,G10>=H10),"W"),AND(ISBLANK(D10),ISNUMBER(H10),ISNUMBER(F10),F10>=H10),AND(ISNUMBER(D10),ISNUMBER(H10),ISBLANK(F10),H10>=D10),IF(OR(AND(ISBLANK(E10),ISNUMBER(H10),ISNUMBER(G10),E10>=H10),"W",AND(ISNUMBER(E10),ISNUMBER(H10),ISBLANK(G10),H10>=G10),"W"))),"P","F"))))

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Nested If Statement

    When you have to resort to this many nested IF functions it is generally a case of inefficient design in the workbook. I suggest you post a sample workbook that meets the following criteria . . .
    1. EXACTLY duplicates the structure of your real workbook, and
    2. Contains representative but non-sensitive dummy data, and
    3. Manually shows a couple of expected results per your conditions

    You should probably consider using a look up table and / or helper columns.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Nested If Statement

    Aye, that IF statement is likely easily replaced with something more efficient, and easier to update in the future. If you can upload a sample workbook we'll be able to get you fixed up much faster.

    mew!
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  4. #4
    Registered User
    Join Date
    01-25-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Nested If Statement

    Here is the example workbook

    Thanks so much for your help!!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-25-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: [SOLVED]Nested If Statement

    I figured it out. Thanks for trying to help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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