+ Reply to Thread
Results 1 to 13 of 13

Is it IF or vlookup or both?

  1. #1
    Registered User
    Join Date
    05-05-2010
    Location
    London, Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Is it IF or vlookup or both?

    Hello,

    please beware with me, if my question is to simple... I'm working on developing my excel skills... but they are scarce...
    i have a large worksheet with different data
    it lists clients salary ranges (see below) I want to be able to match it the lower Bound range (also below).
    I have the following data:
    Range Lower Bound

    under $30,000 0
    $30,000 - $60,000 30,000
    $60,001 - $90,000 60,001
    $90,001 - $120,000 90,001
    Over $120,000 120,000

    How do i tell the cell when there is salary range 'under $30,000' i want to see 0, and so on for the others?

    Thanks in advance.
    Last edited by nigel_miguel; 05-06-2010 at 10:00 AM.

  2. #2
    Forum Contributor
    Join Date
    02-25-2010
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: Is it IF or vlookup or both?

    I would just set up an if statement.

    If(A1 < 30000, 0, If(A1 < 60000, 30000, And so on...

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Is it IF or vlookup or both?

    I'd create a small single column table of your lower boundries like so
    0
    30001
    60001
    90001
    120001
    and use VLOOKUP(B1,$A$1:$A$5,1) where B1 is the salary and A1:A5 is where that little table is. VLOOKUP will return the closest value without going over. 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

  4. #4
    Registered User
    Join Date
    05-05-2010
    Location
    London, Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Is it IF or vlookup or both?

    it does not work, to the 1st response

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Is it IF or vlookup or both?

    See example attached
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-05-2010
    Location
    London, Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Is it IF or vlookup or both?

    Quote Originally Posted by ChemistB View Post
    See example attached
    That won't work because my original data is a range.
    like the following:
    under $30,000
    $30,000 - $60,000
    $60,001 - $90,000
    $90,001 - $120,000
    Over $120,000


    in the column that has the possibility of any of these ranges, I would like to assign it a the lower value. For exmple: if it's under $30,000 i would like to see 0. If it's $30,000 - $60,000 i would like to see $30,000, and so on....

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Is it IF or vlookup or both?

    Yes, that formula works on a range basis. If you put any value between 0 and 30,000 into C2, D2 will return 0. If you put any value between 30,001 and 60,000, D2 will return 30,001 and so on. What do you need that is not covered by that?

  8. #8
    Registered User
    Join Date
    05-05-2010
    Location
    London, Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Is it IF or vlookup or both?

    Quote Originally Posted by ChemistB View Post
    Yes, that formula works on a range basis. If you put any value between 0 and 30,000 into C2, D2 will return 0. If you put any value between 30,001 and 60,000, D2 will return 30,001 and so on. What do you need that is not covered by that?
    I don't think it works because the what is my cell is:
    under $30,000 or $30,000 - $60,001 or the others... the cells contains the $ signs and the commas and dashes.

    i did try your formula and it didn't work.

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

    Re: Is it IF or vlookup or both?

    Update the lookup column to:

    0
    30000
    60001
    90001
    120001

    You can format as Currency, if desired.
    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.

  10. #10
    Registered User
    Join Date
    05-05-2010
    Location
    London, Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Is it IF or vlookup or both?

    I got thanks!!!! how do I show this as resolved?

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

    Re: Is it IF or vlookup or both?

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  12. #12
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Is it IF or vlookup or both?

    I guess I don't speak Canadian.

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

    Re: Is it IF or vlookup or both?

    Quote Originally Posted by ChemistB View Post
    I guess I don't speak Canadian.
    LOL... i guess it's a subliminal understanding we've got...

+ 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