Dynamic VLOOKUP file location

whiteknight

New Member
Joined
Mar 9, 2021
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
I have several Excel files that are identification cards for suppliers (an Excel file for each supplier) and I want to retrieve the data for all suppliers in one Excel file using the Vlookup equation

For example

=VLOOKUP(B1,'E:\New folder\1\[supplier1.xlsx]Sheet1'!B:C,2,FALSE)

I want the file name to be changed automatically based on the name of the supplier, supplier1, based on the “a2” field.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
The only way to do that with a formula is to use the INDIRECT function, but it does not work if the other workbook is closed.
 
Upvote 0
The only way to do that with a formula is to use the INDIRECT function, but it does not work if the other workbook is closed.
thanks
is it possible to use VBA to achieve the same result if the other workbook is closed
 
Upvote 0
The simplest would be for VBA to open the other file.
 
Upvote 0
Not that I can think of.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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