Forum Discussion
What's wrong with my XLOOKUP formula?
The XLOOKUP formula is valid, but it is in the wrong place. A Data Validation list Source must supply selectable items; your XLOOKUP returns one category for D2. If the dropdown should show IDs, set its source to the ID column through a workbook name referring to CatTable[ID]. Then put this formula in a separate display cell: =XLOOKUP(D2,CatTable[ID],CatTable[Categories],"Not found"). If users should choose category text instead, make the validation source the Categories column and omit the lookup. Excel stores the selected item in the validated cell; it cannot store an ID while displaying another category in that cell without VBA or a helper cell. If Excel rejects the structured reference in Data Validation, define a name such as CatIDs referring to =CatTable[ID], then use =CatIDs as the Source. The named reference expands automatically with the table