Forum Discussion

JMACjnorman's avatar
JMACjnorman
Copper Contributor
May 24, 2023
Solved

VLOOKUP - Need to Use "Number" as Text

I am creating a spreadsheet to track door access codes that have been programed and issued. The workbook includes 2 sheets:   Sheet 1: ISSUED Sheet 2: CODES   In Sheet 1, I need to be able to se...
  • HansVogelaar's avatar
    HansVogelaar
    May 24, 2023

    JMACjnorman 

    Thanks. The problem is that VLOOKUP always searches the first column of the lookup range. But the codes are in the second column of the table.

     

    If you have Microsoft 365 or Office 2021, you can use XLOOKUP:

    In E2:   =XLOOKUP([@CODE],Table13[CODE],Table13[DESCRIPTION],"")

    In G2:  =XLOOKUP([@CODE],Table13[CODE],Table13[STATUS],"")

     

    If you have an older version, use INDEX/MATCH:

    In E2:  =IFERROR(INDEX(Table13[DESCRIPTION],MATCH([@CODE],Table13[CODE],0)),"")

    In G2:  =IFERROR(INDEX(Table13[STATUS],MATCH([@CODE],Table13[CODE],0)),"")

Resources