Variables in VLOOKUP

HunterN

Active Member
Joined
Mar 19, 2002
Messages
479
Hi!

I have several workbooks. One is the master workbook that will hold data from several seperate workbooks. I want to use the VLOOKUP function as I move down the rows in the master workbook, the thing is, that means that the table-array (or the workbook that I am searching) will change for each row I go to. I am trying to find an example of how to make a dynamic variable for the table-array that will allow me to change this variable for each row.

This is what I am thinking:

VLOOKUP($C$3, _
'C:My Project["0251.xls"]Sheet1! $A$3:$D$52,2,false)

The "0251.xls" will change for each row I read

Have any suggestions? Thanks
This message was edited by HunterN on 2002-04-23 05:57
 
May as well bump this thread .... trying to figure out how to have a variable sheet name in a formula, I'm trying to pull data from three sheets onto one, for example on one sheet I have this formula in C8:

=VLOOKUP($A8,BS!$A$7:$H$107,C$1,FALSE)

A8 contains the value I'm doing a vlookup on obviously.

What I want is a means of the sheetname table array value to be variable (It's also the first two characters of the lookup_value, so want to use =Left($A8,2) in there as well)

Can reference different workbooks, just struggling with different sheets...

Any advice please?
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,213,530
Messages
6,114,162
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top