Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dave
 
Posts: n/a
Default Vlookup will not reference a validation/drop down box

Is there a way to use a drop down box as the criteria in vlookup. We have a
list of months and the corresponding days in the month. When someone selects
the month from a drop down list, the appropriate number of days should be
returned from the vlookup. The lookup is returning the wrong number of days
for the selected month.

Example

Drop down validation uses the months in column M. The drop down is in cell
D1.

Vlookup in F1 - VLOOKUP(D1,M8:N19,2)

Col M Col N Rows 8-19
October 21
November 22
December 23
January 21
February 20
March 23
April 21
May 22
June 22
July 21
August 23
September 22

As is, the vlookup returns 20 for July. Is there a way to fix the error.

Thanks
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

VLOOKUP(D1,M8:N19,2)


Try changing the formula to:

=VLOOKUP(D1,M8:N19,2,0)

See if that helps.

Biff

"Dave" wrote in message
...
Is there a way to use a drop down box as the criteria in vlookup. We have
a
list of months and the corresponding days in the month. When someone
selects
the month from a drop down list, the appropriate number of days should be
returned from the vlookup. The lookup is returning the wrong number of
days
for the selected month.

Example

Drop down validation uses the months in column M. The drop down is in
cell
D1.

Vlookup in F1 - VLOOKUP(D1,M8:N19,2)

Col M Col N Rows 8-19
October 21
November 22
December 23
January 21
February 20
March 23
April 21
May 22
June 22
July 21
August 23
September 22

As is, the vlookup returns 20 for July. Is there a way to fix the error.

Thanks



  #3   Report Post  
Dave O
 
Posts: n/a
Default

Try changing the formula from VLOOKUP(D1,M8:N19,2) in F1 to
VLOOKUP(D1,$M$8:$N$19,2) Without absolute cell references (the $
signs) the relevant data range changes each time, and skews the output.

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 reference a worksheet Mark Brown Excel Worksheet Functions 4 February 9th 06 01:47 AM
Using a cell reference of a sheet in Vlookup crazybass2 Excel Worksheet Functions 3 August 12th 05 07:51 PM
Convert VLOOKUP to absolute cell reference Rich Excel Discussion (Misc queries) 2 August 6th 05 03:49 AM
use a cell to reference a range in a vlookup Dan Excel Discussion (Misc queries) 4 July 27th 05 07:36 PM
Vlookup reference a worksheet Gary Brown Excel Worksheet Functions 1 May 20th 05 07:17 PM


All times are GMT +1. The time now is 06:21 PM.

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

About Us

"It's about Microsoft Excel"