+ Reply to Thread
Results 1 to 7 of 7

Nested IF Statement-How can I write a Nested IF statement

  1. #1
    Registered User
    Join Date
    09-22-2008
    Location
    markham
    Posts
    52

    Nested IF Statement-How can I write a Nested IF statement

    Hello,

    In column A I have a list of scores (0, 66, 100, etc.).

    In column B I need to identify the corresponding rating (Low, Successful, Commendable, etc.), depending upon where in the score range the number is.

    Score Range and Rating: 121-150: Outstanding, 91-105: Commendable, 61-90: Successful, 30-60: Developing , 0: Low

    Ex. Score 66 should have a Rating of Successful, 33 Successful.

    How can I write a Nested IF statement that would accommodate these different ratings options?

    Thank you.

    Brandy
    Last edited by Brandy; 01-14-2009 at 07:00 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    You want to use VLOOKUP instead of Nested IF's. Create a table (e.g. Sheet2!A1:B5) with the lower limit of each catagory in A with catagory in B
    Please Login or Register  to view this content.
    Then in your formula, let's say you're referring to a rating in A1
    Please Login or Register  to view this content.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949
    I'd use index match, I don't see where your formula accounts for rounding down, ChemistB.

    See attached.

    MATCH gives you the ROW in which the closest match (in this case rounded down) is to the criteria.

    So if it's between 30-60, it'd return 2, being found in the second row.

    INDEX then returns the information from the 2nd row of the array given.
    Attached Files Attached Files
    Last edited by mewingkitty; 01-14-2009 at 06:12 PM.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Another option. Assuming the scores start in A1, you can use:

    =LOOKUP(A1,{0,30,61,91,121},{"Low","Developing","Successful","Commendable","Outstanding"})

    Then copy down.

    HTH

    Jason

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Hi Mewing,
    I'm not sure what you mean by "rounding down". I tried the formula with 29,30,31 (Low, Dev, dev) and 120, 121,150 (Commend, OutSt. OutSt).

  6. #6
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949
    Was using a named range in my first worksheet, this one might be easier to learn from, since it references all arrays by range.

    EDIT
    ChemistB,
    I didn't know that VLOOKUP looked for the lowest corresponding number, to be honest I thought it only returned exact matches.

    Shows what I know ><
    Attached Files Attached Files
    Last edited by mewingkitty; 01-14-2009 at 06:18 PM.

  7. #7
    Registered User
    Join Date
    09-22-2008
    Location
    markham
    Posts
    52

    Thank you Boys

    That worked well Mewing...not sure I fully understand the formula, but I follow the logic.

    Cheers.

+ 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