Search code examples
google-sheetsgoogle-sheets-formulaspreadsheet

Problem in Nearest Match Greater Than or Equal to the Search Key in Vlookup


How do I find the nearest match greater than or Equal to the Search Key in Vlookup?

I have tried this method, but it does not meet my requirements.

=ARRAYFORMULA(Vlookup(A2:A,{{1;Data!A2:A5},{Data!B2:B5;if(,,)}},2))

Spreadsheets Demo Here


Solution

  • Use XLOOKUP() with match mode parameter -1 that indicated to search exact match or next lower values. Try-

    =INDEX(XLOOKUP(A2:A,Data!A2:A,Data!B2:B,"",-1))
    

    enter image description here