Forum Discussion

Help_appreciated's avatar
Help_appreciated
Copper Contributor
Jan 16, 2024
Solved

Excel XLOOKUP 2 column lookup array

Can someone help with this formula please? Essentially want the staff sheet to autofill from the rooms sheet. As there are two columns to be searched (C4-D36 for example for 9-11), my basic skill is...
  • HansVogelaar's avatar
    Jan 16, 2024

    Help_appreciated 

    In C5:

     

    =LET(a,XLOOKUP($B5,Rooms!C$5:C$36,Rooms!$B$5:$B$36,""),b,XLOOKUP($B5,Rooms!D$5:D$36,Rooms!$B$5:$B$36,""),c,TEXTJOIN(",",TRUE,a,b),IF(c="","Empty",c))

     

    (You may want to use "Check" instead of "Empty" - that's up to you.

Resources