ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlookup (https://www.excelbanter.com/excel-worksheet-functions/67888-vlookup.html)

will

vlookup
 
Hi,

Is it possible to set the table-array in vlookup to a name referenced by
another cell?
In other words, I would like to be able to have the formula pick from a
different table dependant on a user input, where that user input is the name
of 1 of 2 possible array names.

Thus, I have a sales report where I am comparing actual to budget for each
customer. Half way through the year we will redo the budget and call it
forecast1. I want to set up one monthly report so that it reports on either
budget or forecast1 depending on whether I have "budget" or "forecast1"
entered in cell A1, say. The formula is therefore =vlookup(a9,a1,3) where a9
will be a customer's name and 3 will be the month number. However, when I try
this it doesn't seem to work. If I replace a1 with "Budget" or "Forecast1" it
will work.

Any help greatfully received!

Will

Philip J Smith

vlookup
 
Use

=vlookup(a9,indirect(a1),3)

This assumes that "Budget" and "Forecast1" are named ranges.

Regards
Phil

"will" wrote:

Hi,

Is it possible to set the table-array in vlookup to a name referenced by
another cell?
In other words, I would like to be able to have the formula pick from a
different table dependant on a user input, where that user input is the name
of 1 of 2 possible array names.

Thus, I have a sales report where I am comparing actual to budget for each
customer. Half way through the year we will redo the budget and call it
forecast1. I want to set up one monthly report so that it reports on either
budget or forecast1 depending on whether I have "budget" or "forecast1"
entered in cell A1, say. The formula is therefore =vlookup(a9,a1,3) where a9
will be a customer's name and 3 will be the month number. However, when I try
this it doesn't seem to work. If I replace a1 with "Budget" or "Forecast1" it
will work.

Any help greatfully received!

Will



All times are GMT +1. The time now is 10:16 AM.

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