+ Reply to Thread
Results 1 to 5 of 5

Multiple IF's/Greater than, smaller than, equal to.

  1. #1
    Registered User
    Join Date
    11-21-2011
    Location
    Sussex, UK
    MS-Off Ver
    Excel 2007
    Posts
    10

    Multiple IF's/Greater than, smaller than, equal to.

    Hi All,

    I'm trying to create a multiple IF statement that incorporates a smaller than or equal to /greater than function, and it's got me stumped!

    Column A contains numbers. In the second column, I need to say that if the number in column A is greater than 0 but smaller than or equal to 500 it should be "Green", if it's greater than 500 but smaller than or equal to 5000 it should be "Orange" and if it's greater than 5000 is should be "Blue".

    Please help, Excel wizards!
    Last edited by Aileanor; 11-21-2011 at 11:33 AM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Multiple IF's/Greater than, smaller than, equal to.

    Hello & Welcome to the Board,

    Try...

    =LOOKUP(A1,{1,501,5001},{"Green","Orange","Blue"})
    HTH
    Regards, Jeff

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple IF's/Greater than, smaller than, equal to.

    Try:

    =IF(A2<=500,"Green",IF(A2<=5000,"Orange","Blue"))

    or if you are dealing with whole numbers only

    =LOOKUP(A2,{0,501,5001},{"Green","Orange","Blue"))

    This one is more flexible and easier to add more variables to..
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    11-21-2011
    Location
    Sussex, UK
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Multiple IF's/Greater than, smaller than, equal to.

    Thank you both, that's worked perfectly.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Multiple IF's/Greater than, smaller than, equal to.

    You're welcome...glad you got it working.

    If you are satisfied with the solution(s) provided, please don't forget to mark the thread as solved.

+ 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