Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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) "comparini3000" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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)) -- Kevin Vaughn "comparini3000" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
ahh...ok. thank you both very much
|
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You are welcome.
-- Kevin Vaughn "comparini3000" wrote: ahh...ok. thank you both very much |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup and left function | Excel Discussion (Misc queries) | |||
Can Vlookup check a cell to the left? | Excel Worksheet Functions | |||
make a vlookup using a variable path | Excel Worksheet Functions | |||
vlookup data hidden within worksheet | Excel Worksheet Functions | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |