I have a complex workbook with named tables. I want to use a named formula in an XLOOKUP to identify the array I want to search. Essentially, instead using TableName[Header], I want to use TableName[formulaResult] for the return result.
Table1:
| Date |
Event |
Organizer |
| 12/1/2025 |
Concert |
Symphony |
| 1/3/2026 |
Demonstration |
Debate Team |
Table2:
| Organizer |
Event |
Date |
| Symphony |
|
12/1/2025 |
| Debate Team |
Demonstration |
1/3/2026 |
I want to find the Event in Table2 based on the Date and Organizer.
I'm using an INDEX formula to find the column header of the column the formula sits in. I've named the INDEX formula "getColumnName" in the Name Manager.
If I put =getColumnName in Table2[B2], I get the result "Event." This works just fine.
I'd like to use this result in my XLOOKUP to make this search as dynamic as possible, but I'm striking out. Essentially, I want:
XLOOKUP(Table2[Organizer]&Table2[Date],Table1[Organizer]&Table2[Date],Table1[getColumnName])
My expectation is that the formula in Table3[C1], would translate as:
XLOOKUP(Table2[Organizer]&Table2[Date],Table1[Organizer]&Table2[Date],Table1[Event])
Excel isn't recognizing the return array Table1[getColumnName].
I thought the solution might be to place the XLOOKUP inside a Let(), e.g.:
Let(colName,getColumnName,XLOOKUP(Table2[Organizer]&Table2[Date],Table1[Organizer]&Table2[Date],Table1[colName]))
But that also throws an error. I'm new to using Named formulas and Let(). I think the issue is that Excel doesn't allow a formula as a value to identify the Named Range.
Does Excel allow for this option?
**
In case it's needed, this is the INDEX function:
INDEX(Table2[#Headers],COLUMN()-MIN(COLUMN(Table2))+1)