Search code examples
google-sheetsmatchgoogle-sheets-formulags-vlookupimportrange

Index-Match (find last value which matches criteria)


I am trying to have my Index match formula in Google Sheets return the last matching value in a series of values. Currently of course it only returns the first:

=INDEX (IMPORTRANGE("https://docs.google.com/spreadsheets/d/1FAkqI_IDrWREzppeLkxx43TnSyrWs9ayS_R__l7RU/edit#gid=1044750","'Form Responses 1'!C1:C"),MATCH(B5, IMPORTRANGE("https://docs.google.com/spreadsheets/d/1FAkqI_IDrWREzppezkxx43TnSyrWs9ayS_R__l7RU/edit#gid=1044750","'Form Responses 1'!AA1:AA"),0))

Does anyone have a suggestion?

Really Appreciated Dan


Solution

  • try:

    =VLOOKUP(B5, SORT({
     IMPORTRANGE("1FAkqI_IDrWREzppezkxx43TnSyrWs9ayS_R__l7RU", "'Form Responses 1'!AA1:AA"), 
     IMPORTRANGE("1FAkqI_IDrWREzppezkxx43TnSyrWs9ayS_R__l7RU", "'Form Responses 1'!C1:C")}, 
     1, 1), 2, 0)