Vlookup to the left

C

comparini3000

I have the following in columns a and b:

_A__B_
Jan| 1 |
Feb| 2 |
Mar| 3 |
etc...

when a number is put into cell A15, i want A16 to return the month. this is
the formula i have:

=VLOOKUP(A15,A1:B12,1,FALSE)

unfortunately, it's returns #N/A. I know how to work the vlookup when, for
example, i'm looking up the month and i want the month number to be returned.
I can't get vlookup to work when the lookup value is in column 2 of the
array and the result value is in column 1. What am I doing wrong? Cheers

comparini3000
 
B

bpeltzer

vlookup MUST have the key values in the left-most column. To do a lookup
with the table structured otherwise, you'd first do a MATCH to determine how
far down in the table to look, then an INDEX to go that far down in your
chosen column:
=index(a:a,match(a15,b:b,0)-1)
 
K

Kevin Vaughn

You can't use vlookup when you want to return something to the left of the
lookup range. Try index/match instead:

=INDEX($A$2:$A$13,MATCH(A15,$B$2:$B$13,0))
 

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

Top