I want to create a summary table in one workbook that uses Xlookup to match criteria in a table of data in another workbook. I would like the return array of the Xlookup to change based on the header of the table in the summary workbook.
I can successfully pull the data I need when specifying the named table and column like this.
=XLOOKUP(B9&B10,'2022 Farnam Performance Data Collector.xlsx'!ManagerKPI[[#All],[Entity Name]]&'2022 Farnam Performance Data Collector.xlsx'!ManagerKPI[[#All],[Metric Name]],'2022 Farnam Performance Data Collector.xlsx'!ManagerKPI[[#All],[1/21/2022]],"Not Found",,)
However, I want to be able to change the [1/21/2022]]
reference based on the summary table header.
I tried an indirect reference and got #Ref. Checking calculation steps the #REF error occurs when pulling text from the cell I specified. Also if at all possible I would prefer to not have an indirect in my formula if at all possible.
=XLOOKUP(B9&B10,'2022 Farnam Performance Data Collector.xlsx'!ManagerKPI[[#All],[Entity Name]]&'2022 Farnam Performance Data Collector.xlsx'!ManagerKPI[[#All],[Metric Name]],INDIRECT("'2022 Farnam Performance Data Collector.xlsx'!ManagerKPI[[#All],["&1/21/2022&"]]", TRUE),"Not Found",,)
screenshots refer -
a) remove table formulae (file -> options -> formulas -> Use table names [deselect/uncheck box]
b) Include an index reference for the column lookup - SEE index component of following example that searches for 2022/1/21 (date formatted) in the SOURCE.xlsx file (bottom) to retrieve row1 to DEST.xlsx file (top):
voila!