+ Reply to Thread
Results 1 to 5 of 5

IF else.

Hybrid View

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Oslo
    MS-Off Ver
    Excel 2007
    Posts
    23

    IF else.

    Hi guys,
    This should be fairly simple but I want to know how to do this smartly.
    I have a list of integers in excel 2010. I want to have a formula, that returns me a 'Low', 'Mid' 'High' based on the number range.

    My ranges are:

    Low if less than 80
    Medium if between 80 and 250
    High if between 250 and 400
    Top if greater than or equal to 400

    How will I be able to do this?

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

    Re: IF else.

    hi Ali79. assuming your data is in A1, try:
    =LOOKUP(A1,{0,80,250,400},{"Low","Medium","High","Top"})

    your criteria stated overlaps, so adjust according if it's not what you need.
    Low: <80 (0 to 79)
    Med: between 80 and 250 (81 to 249?) so how about 80?
    High: between 250 and 400 (251 to 399?) so how about 250?
    Top: >=400

    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

  3. #3
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: IF else.

    Ali79,

    Not sure exactly what you mean by doing this "smartly", but the following will work, in Cell B2, assuming your data/integer is in Cell A1:

    =IF(A1<80,"LOW",IF(A1<250,"MEDIUM",IF(A1<400,"HIGH","TOP")))
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,057

    Re: IF else.

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Never use Merged Cells in Excel

  5. #5
    Registered User
    Join Date
    07-25-2012
    Location
    Oslo
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: IF else.

    Thanks Benishiryo,

    I just tried this but dont understand why I only get 'top' as response even if the value is lower than 80 ?

+ 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