Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
comparini3000
 
Posts: n/a
Default Vlookup to the left

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Vlookup to the left

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default Vlookup to the left

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
comparini3000
 
Posts: n/a
Default Vlookup to the left

ahh...ok. thank you both very much
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default Vlookup to the left

You are welcome.
--
Kevin Vaughn


"comparini3000" wrote:

ahh...ok. thank you both very much

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup and left function Corey Osborn Excel Discussion (Misc queries) 3 March 23rd 06 06:36 PM
Can Vlookup check a cell to the left? koala Excel Worksheet Functions 3 July 13th 05 02:31 AM
make a vlookup using a variable path Alex St-Pierre Excel Worksheet Functions 1 March 2nd 05 11:54 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 05:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"