ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vlookup - choice of ranges (https://www.excelbanter.com/excel-discussion-misc-queries/104197-vlookup-choice-ranges.html)

confused

vlookup - choice of ranges
 
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.



Max

vlookup - choice of ranges
 
=VLOOKUP(C27,RANGENAME FROM CELL B2, 2,FALSE)

Try: =VLOOKUP(C27,INDIRECT(B2),2,FALSE)
where B2 contains the defined range name
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"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

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


All times are GMT +1. The time now is 11:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com