itsrich
Board Regular
- Joined
- Apr 13, 2009
- Messages
- 73
- Office Version
- 365
- Platform
- Windows
I am pullling data from multiple workbooks with multiple tabs. The file folder, file name, and tab all change, but the data is in the same place on all the spread sheets.
If I was on one tab I would use XLOOKUP(B5,'S:\2025 Purchasing\2.SPREADSHEETS\[Cycle Count 1 (Floor) 2025.xlsm]360 Products '!$D:$D,'S:\2025 Purchasing\2.SPREADSHEETS\[Cycle Count 1 (Floor) 2025.xlsm]360 Products '!$G:$G,"")
So I am choosing to use INDIRECT("'[&file name&".xlsm]"&tab name&"'!cell name")
Assume these are in column X:Z and rows 1:2
Replacing the green text with INDIRECT("'CONCAT(X2,'\[',Y2,".xlsm]")'"&Z2&"'!$D:$D)
XLOOKUP(B5,'INDIRECT("'CONCAT(X2,'\[',Y2,".xlsm]")'"&Z2&"'!$D:$D),'S:\2025 Purchasing\2.SPREADSHEETS\[Cycle Count 1 (Floor) 2025.xlsm]360 Products '!$G:$G,"")
Excel sites an error and highlights this part of the formula "\[". The " and ' mix me up. I think I am close.
Thank you for your help.
If I was on one tab I would use XLOOKUP(B5,'S:\2025 Purchasing\2.SPREADSHEETS\[Cycle Count 1 (Floor) 2025.xlsm]360 Products '!$D:$D,'S:\2025 Purchasing\2.SPREADSHEETS\[Cycle Count 1 (Floor) 2025.xlsm]360 Products '!$G:$G,"")
So I am choosing to use INDIRECT("'[&file name&".xlsm]"&tab name&"'!cell name")
Assume these are in column X:Z and rows 1:2
File Folder | File | Tab |
S:\2025 Purchasing\2.SPREADSHEETS | Cycle Count 1 (Floor) 2025 | 360 Products |
Replacing the green text with INDIRECT("'CONCAT(X2,'\[',Y2,".xlsm]")'"&Z2&"'!$D:$D)
XLOOKUP(B5,'INDIRECT("'CONCAT(X2,'\[',Y2,".xlsm]")'"&Z2&"'!$D:$D),'S:\2025 Purchasing\2.SPREADSHEETS\[Cycle Count 1 (Floor) 2025.xlsm]360 Products '!$G:$G,"")
Excel sites an error and highlights this part of the formula "\[". The " and ' mix me up. I think I am close.
Thank you for your help.