INDIRECT within XLOOKUP with maximum flexability

Status
Not open for further replies.

itsrich

Board Regular
Joined
Apr 13, 2009
Messages
77
Office Version
  1. 365
Platform
  1. Windows
This formula breaks when the file is closed. I know. I am open to other ideas.

S4 allows the change of the File Name
S3 allows me to change the Tab Name

The Goal
1. correct syntax to replace $D:$D with a cell reference of S5
2. correct syntax to replace $F:$F with a cell reference of S6

=XLOOKUP(B3,INDIRECT("'["&$S$4&".xlsm]"&S3&"'!S5"),INDIRECT("'["&$S$4&".xlsm]"&S3&"'!S6"),"Obsolete?")

XLOOKUP(B3,INDIRECT("'["&$S$4&".xlsm]"&S3&"'!$D:$D"),INDIRECT("'["&$S$4&".xlsm]"&S3&"'!$F:$F"),"Obsolete?") ~ this formula works
S3 = Tab Name = 20C-25-376
S4 = File Name = 2025 Lamination Calculator
S5 = Lookup Array = $D:$D
S6 = Return Array = $F:$F
 
Duplicate post

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.
 
Upvote 0
Status
Not open for further replies.

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