Search code examples
google-sheetscountgoogle-sheets-formulavlookupgoogle-query-language

Google Sheets Vlookup with dynamic result i.e. keep blank rows and show result in next matching value


Column A in the below image is user input and result is expected in column B and C. Result is to be derived from the data available in Column F and G by matching column A with Column E.

enter image description here Any help on above will be greatly appreciated.


Solution

  • use in B3:

    =ARRAYFORMULA(IFNA(VLOOKUP(A3:A&"×"&COUNTIFS(A3:A, A3:A, ROW(A3:A), "<="&ROW(A3:A)), 
     {E3:E&"×"&COUNTIFS(E3:E, E3:E, ROW(E3:E), "<="&ROW(E3:E)), F3:G}, {2, 3}, 0)))
    

    enter image description here