Lookup fn using a dynamic filename.

G

Guest

Guest
I am trying to use lookup on a dynamic file list.
I have a number of files in a directory, I want to do a lookup in.

So,
lookup(1,'[File1]8D Form'!$b3:$b1030,'[File1]8D Form'!$c3:$c1030)

lookup(1,'[File2]8D Form'!$b3:$b1030,'[File2]8D Form'!$c3:$c1030)

Where file1, file2 etc come from a directory list.

I can get file1 and file2 etc easily. What I can’t seem to do is dynamically create the lookup command.
I can create the text of the lookup function, I just cant tell it it’s a function and not text!


Any help would be most appreciated!

BJ
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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