View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default vlookup - choice of ranges

=vlookup(c27,indirect(b2),2,false)



confused wrote:

Hi,

I'd really appreciate it if someone can help me solve the following problem
i'm having.

I want to do a vlookup where there are 12 ranges to choose from (i have 12
ranges - where the ranges are named for each month jan - dec). I want to be
able to select the range based on the current month (chosen from a drop down
list in a specific cell). however when i refer the the cell with the current
month, vlookup thinks i am specifying that cell as the range (what i want is
the range which the cell is currently showing). I have tried the text() and
concatenate() functions to return the range name, but this doesnt seem to
work. the function i want show go like this;

=VLOOKUP(C27,RANGENAME FROM CELL B2, 2,FALSE)

where RANGENAME FROM CELL B2 is a function that returns the name of a range
based on the currently selected month in cell B2 - which is a dropdown list
with january - december.

Hope some wonderful person out there can help me.


--

Dave Peterson