Search code examples
google-sheetsgoogle-sheets-formulaformula

I can't figure out why my VLOOKUP function isn't working in Google Sheets


I am trying to use a VLOOKUP formula in one of my Google Spreadsheets. It seems to be working, but only sporadically. A good half of the column with the VLOOKS are coming in blank. I keep looking over them, trying to rewrite them, but it isn't changing anything. Here is a link to a sample sheet: Sample Spreadsheet

This is one of the last iterations of the VLOOKUP, in column C, on "Sheet2":

=VLOOKUP(CONCAT(A8,B8),{ARRAYFORMULA(CONCAT(OGTransact!A$2:A,OGTransact!B$2:B)),OGTransact!C$2:C},2)

Any help would be wonderful. Thank you so much!


Solution

  • As what @Tom Sharpe said, If you want to find the exact match of your data, You have to put FALSE for the is_sorted paramater.

    So the modified formula is :

    =VLOOKUP(CONCAT(A2,B2),{ARRAYFORMULA(CONCAT(OGTransact!A$2:A,OGTransact!B$2:B)),OGTransact!C$2:C},2,FALSE)
    

    Another Alternative Solution is using XLOOKUP Function:

    =XLOOKUP(CONCAT(E3,F3),ARRAYFORMULA(CONCAT(A$2:A,B$2:B)),C$2:C,"NONE",0)
    

    RESULT: enter image description here

    Note: You can change the range to suit your needs.

    Reference:

    1. VLOOKUP Function

    2. XLOOKUP Function