+ Reply to Thread
Results 1 to 10 of 10

If statement based on multiple criteria

  1. #1
    Forum Contributor
    Join Date
    12-02-2013
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    152

    If statement based on multiple criteria

    You guys are so awesome!

    I am looking for a way to say

    IF A2>9 then B2 returns bronze
    IF A2>24 then B2 returns Silver
    IF A2> 49 then B2 returns Gold
    IF A2>99 then B2 returns Platinum

    THANKS!
    tom

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: If statement based on multiple criteria

    Hi TomRet,

    An IF(OR ... statement should do it for the result in Cell 'A2'.

    Then you would need a Conditional Formatting Formula to shade the Cell 'B2'.

    Hth
    Remember you are unique, like everyone else

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If statement based on multiple criteria

    a Merry Christmas to you, Tom. an IF formula would probably be something like:
    =IF(A2>99,"Platnium",IF(A2>49,"Gold",IF(A2>24,"Silver",IF(A2>9,"Bronze",""))))

    if it's always integers, maybe also consider:
    =LOOKUP(A2,{10,25,50,100},{"Bronze","Silver","Gold","Platnium"})

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: If statement based on multiple criteria

    Here's the Formula;

    Please Login or Register  to view this content.
    This puts the text into Column 'C' based on the condition.

    Hth

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: If statement based on multiple criteria

    noboffin, if you start with the largest and work down to the smallest, you can do away with the AND()'s

    edit: I just saw that Ben already did it that way
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Contributor
    Join Date
    12-02-2013
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: If statement based on multiple criteria

    Awesome guys! I used Ben's (Merry Christmas to you as well!) integer system although I didn't think it would work since the numbers may not always by 10, 25,....but even with 80 it works just fine. One thing, would it be possible to put in a clause to make it return blank ("") or would I need to go with the other formula for that?

    Cheers
    Tom

  7. #7
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: If statement based on multiple criteria

    Good tip, thank you

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: If statement based on multiple criteria

    maybe...
    =if(A2=0,"",LOOKUP(A2,{10,25,50,100},{"Bronze","Silver","Gold","Platnium"}))

  9. #9
    Forum Contributor
    Join Date
    12-02-2013
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: If statement based on multiple criteria

    Fantastic! Actually all of these formulas work.

    fdibbins: I made one minor modification to make yours work for my purposes;
    =IF(Q3<10,"",LOOKUP(Q3,{10,25,50,100},{"Bronze","Silver","Gold","Platinum"}))

    Thanks so much and Merry Christmas
    Tom

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: If statement based on multiple criteria

    Happy to help and thanks for the feedback

+ 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. Count statement wtih multiple criteria only showing results for one criteria
    By uhlabomber in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2013, 02:47 PM
  2. [SOLVED] If statement that will look among multiple criteria and generate a statement
    By liz5818 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2013, 04:12 PM
  3. [SOLVED] Need IF statement or Macro to make decision based on multiple criteria
    By weddica in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2013, 03:30 PM
  4. [SOLVED] Nested IF statement to return a value based on multiple criteria
    By harrydnyc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2011, 11:45 AM
  5. IF Statement based on several criteria
    By jantonio in forum Excel General
    Replies: 2
    Last Post: 06-08-2009, 12:11 PM

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