Forum Discussion

CCSJonell's avatar
CCSJonell
Copper Contributor
Sep 07, 2023
Solved

Look up table?

I need column B to fill based on the index # in column A.  The key to the index is in columns D and E.

 

 

  • CCSJonell 

    In B2:

     

    =XLOOKUP(A2, $D$3:$D$18, $E$3:$E$18, "")

     

    or

     

    =IFERROR(VLOOKUP(A2, $D$3:$E$18, 2, FALSE), "")

     

    Fill down.

7 Replies

  • CCSJonell 

    HansVogelaar's code works faultlessly.  My taste is for something more up to date such as

    = LET(
        name, XLOOKUP(buildingCode2, bcode, bname, "<unknown>"),
        HSTACK(buildingCode2, name)
      )

    but that is no use to you while you stick to obsolete code (I would just say 'out of date' but the change has been too large for that). 

  • CCSJonell 

    In B2:

     

    =XLOOKUP(A2, $D$3:$D$18, $E$3:$E$18, "")

     

    or

     

    =IFERROR(VLOOKUP(A2, $D$3:$E$18, 2, FALSE), "")

     

    Fill down.

Resources