How to get the last entry containing a certain value in Google Spreadsheet

68 views Asked by At

I have an answer spreadsheet linked to a Google form. I wish to get the last date that and answer was submitted.

Lets say I my entries look like this :

DATA :

         A               B

  1      Date            String  

  2      2015-05-09      Abb  

  3      2015-05-11      Bcc

  4      2015-05-12      Cdd

  5      2015-05-20      Bcc

  6      2015-06-01      Abb  

The result that i want would look like this :

         A               B

  1      String          Last date 

  2      Abb             2015-06-01 

  3      Bcc             2015-05-20

  4      Cdd             2015-05-12

Ideally, I would like to do so with formulas only!

1

There are 1 answers

0
JPV On BEST ANSWER

Assuming your data starts in row 2, try:

=ArrayFormula(iferror(vlookup(unique(B2:B), sort({B2:B, A2:A}, 2, 0), {1, 2}, 0 )))

Change ranges to suit. Don't forget to include the sheetname if you need that formula to appear on another sheet.