ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I use VLOOKUP to ref multiple workbooks with multiple tabs? (https://www.excelbanter.com/excel-discussion-misc-queries/82656-how-do-i-use-vlookup-ref-multiple-workbooks-multiple-tabs.html)

JackieW

How do I use VLOOKUP to ref multiple workbooks with multiple tabs?
 
I have inherited a problem. I work with two multiple worksheet workbooks.
The first workbook is the "master" into which data from the second is pulled.

In the formula pasted below, the phrase "Small Growth" is one of forty
distinct worksheet names in the second workbook "expense stats.xls." Each
worksheet is built identically to the other.

=VLOOKUP($A$3,'C:\My Documents\[expense stats.xls]Small
Growth'!$C$2:$G$2000,5,FALSE).

The formula works but the "Small Growth" expression must be manually
changed. I need a way to automate this. The names originate as values in
$T4 of the INPUT worksheet in workbook one (the master).


Eddie O

How do I use VLOOKUP to ref multiple workbooks with multiple tabs?
 
Check out the INDIRECT formula. It would allow you to construct the text
inside the formula dynamically, so that you could pull the names of the
different worksheets from an array where you'd keep them, for example.

"JackieW" wrote:

I have inherited a problem. I work with two multiple worksheet workbooks.
The first workbook is the "master" into which data from the second is pulled.

In the formula pasted below, the phrase "Small Growth" is one of forty
distinct worksheet names in the second workbook "expense stats.xls." Each
worksheet is built identically to the other.

=VLOOKUP($A$3,'C:\My Documents\[expense stats.xls]Small
Growth'!$C$2:$G$2000,5,FALSE).

The formula works but the "Small Growth" expression must be manually
changed. I need a way to automate this. The names originate as values in
$T4 of the INPUT worksheet in workbook one (the master).


Ardus Petus

How do I use VLOOKUP to ref multiple workbooks with multiple tabs?
 
You coul use an INDIRECT referece in your VLOOKUP formula if "expense
stats.xls" is also opened.
If not opened, you get a #REF error

HTH
--
AP

"JackieW" a écrit dans le message de
...
I have inherited a problem. I work with two multiple worksheet workbooks.
The first workbook is the "master" into which data from the second is

pulled.

In the formula pasted below, the phrase "Small Growth" is one of forty
distinct worksheet names in the second workbook "expense stats.xls." Each
worksheet is built identically to the other.

=VLOOKUP($A$3,'C:\My Documents\[expense stats.xls]Small
Growth'!$C$2:$G$2000,5,FALSE).

The formula works but the "Small Growth" expression must be manually
changed. I need a way to automate this. The names originate as values in
$T4 of the INPUT worksheet in workbook one (the master).





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

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