Vlookup question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi-
I have a spreadsheet that looks at individuals and the amount they paid
within a certain year for healthcare expenditures. Based upon this level of
expenditure, I would like Excel to spit out the Category that the individual
falls into. Here is what the table for looking up the category looks like:
A B C
Category Min Max
00 $0 $20
01 $20 $165

Thus, if the expenditure is $17, they would fall into category 00. How do I
do this in Excel? I know its probably an easy VLOOKUP function but I'm not
sure how to do the VLOOKUP function when telling Excel that it should
determine whether the value falls in between the Minimum and Maximum for the
category. Any help is greatly appreciated!
thanks!
 
If you switch places between category and then use on range for the values
There is an error since you have 20 for both max in the 00 and min in the 01
so if you switch and then use

$0 00
$21 01
$166 02

and so on and let's say you call the table MyTable


=VLOOKUP(Amount_cell,MyTable,2)

will return 00 for $17 and 00 for $20 but 01 for $21 and $165

if you need to have the 00, 01 to the left you need to use

=INDEX(A1:A10,MATCH(Amount_cell,B1:B10,1))
 
Thank you for the tip-I really appreciate the help! Actually, I was playing
around with it and doing some research and found out that I should just use
the minimum values and have the category to the right of the minimums. It
worked beautifully.
thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

vlookup with 2 conditions? 2
Blurred Vision 3
How to count the occurrence? 3
VLOOKUP in 2003 1
VLOOKUP and sum 7
Need Help with Double Vlookup 4
Complex Formula question 9
Birth Date in Range 5

Back
Top