google-sheets

googlesheet get last non blank row from specific rows


By Following code in google spreadsheet I select last not empty row (based on data in H column and get data from cell "O").

=INDEX(O:O,MAX(IF( H:H<>"",ROW(H:H),0)))

It work properly. Now, I want to add condition to that search so it check only specific rows. ( Rows with specific amount in A column, so I need to add A:A="string" condition to that formula) how can I do that?


Solution

  • You may try:

    =index(O:O,max(if((H:H<>"")*(A:A="String"),row(H:H),0)))
    

    OR

    =chooserows(filter(O:O,H:H<>"",A:A="String"),-1)