+ Reply to Thread
Results 1 to 12 of 12

If Nested Formula

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    If Nested Formula

    I'm trying to do an IF nested formula based on pass marks but the formula I'm using only returns "Fail" no matter the pass mark, what am I doing wrong:

    =IF(B18>=50,"Pass",IF(B18>=60,"Merit",IF(B18>=70,"Distinction","Fail")))

    Any help will be greatly appreciated.

    Thanks In Advance

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: If Nested Formula

    You need to reorder your formula to this...
    =IF(B18>=70,"Distinction",IF(B18>=60,"Merit",IF(B18>=50,"Pass","Fail")))
    the problem with the first order is that any value above 50 will solve the first part of the equation so a 70 is also greater than or equal to 50 so it would return pass and not distinction.
    Now if this doesn't work you may have values that appear as numbers but are in fact text.
    test that using =ISNUMBER(B18) to see, if it returns true then it is a number, false is text.

    if it is text, use this instead... =IF(B18*1>=70,"Distinction",IF(B18*1>=60,"Merit",IF(B18*1>=50,"Pass","Fail")))
    Last edited by Sam Capricci; 01-15-2020 at 06:36 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: If Nested Formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: If Nested Formula

    Thank you for this, tried what you suggested but still returned fail only. Used the =ISNUMBER(B18) formula and returns a true so it's definitely and number, B18 is set up as a percentage to 2 decimal places not sure if that's causing an issue. Was hoping this would work and cannot understand why, the only other solution is possibly using a vlookup to a table of results with the pass mark and the classification but was hoping not to do that.

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: If Nested Formula

    Many thanks for this formula also but this didn't work either returned fail only.

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: If Nested Formula

    can you post a sample using the instructions at the top of the post in the yellow banner?

  7. #7
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: If Nested Formula

    Hi Sambo Kid, I've attached a spreadsheet copying and pasting the cells from my original spreadsheet. Thanks for your help on this.

  8. #8
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: If Nested Formula

    Attachment.
    Attached Files Attached Files

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: If Nested Formula

    here is the adjustment to make...
    =IF(B1>=70%,"Distinction",IF(B1>=60%,"Merit",IF(B1>=50%,"Pass","Fail")))
    the problem you had was that percents are less than 1 but your formula was all numbers greater than 1 (88% is equal to 0.88).
    also you still need to reverse the order.

  10. #10
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: If Nested Formula

    then
    =LOOKUP(B1,{-9E9,50,60,70}%,{"Fail","Pass","Merit","Distinction"})
    Last edited by BMV; 01-15-2020 at 07:23 AM.

  11. #11
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: If Nested Formula

    Thank you so much, that's worked and is perfect.

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: If Nested Formula

    You're welcome. Please don't forget to mark the post as solved using the thread tools dropdown at the top.
    and you can thank any and all who stopped by to work on it by clicking on the * Add Reputation below one of their posts, it is how we advance on this forum.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] IFS to Nested IF Formula
    By mallory34 in forum Excel General
    Replies: 7
    Last Post: 08-21-2019, 11:15 AM
  2. Value of cell formula not working in nested IF formula.
    By dschierman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-01-2019, 04:59 PM
  3. [SOLVED] Nested IF and nested Concatenation formula
    By VisionSmart in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-09-2018, 08:00 AM
  4. Help with a nested, nested, nested formula
    By duanrd2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-09-2017, 04:43 PM
  5. Replies: 2
    Last Post: 08-24-2014, 04:56 AM
  6. Replies: 2
    Last Post: 10-08-2009, 09:51 PM
  7. help on a nested countif/nested if formula
    By vickiemc in forum Excel General
    Replies: 2
    Last Post: 08-13-2008, 08:29 AM

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