FormulaCraft

How to look up the most recent date for an item in Excel and Google Sheets

Topic:Lookups (any direction)
Excel & Google Sheets
=MAXIFS($B$2:$B$5,$A$2:$A$5,"Apple")

Verified example

Computed by a real spreadsheet engine on the sample data below.

ItemDate
Apple2024-01-15
Banana2024-01-20
Apple2024-02-05
Banana2024-01-10

=MAXIFS($B$2:$B$5,$A$2:$A$5,"Apple")0

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Ensure dates are stored as real date values, not text strings, in column B.
  2. 2In Excel 2019+ or Google Sheets, use =MAXIFS(date_range,criteria_range,criteria): =MAXIFS($B$2:$B$100,$A$2:$A$100,E2).
  3. 3For older Excel versions use the array formula =MAX(IF($A$2:$A$100=E2,$B$2:$B$100)) confirmed with Ctrl+Shift+Enter.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

How do I return a value from another column on the row with the most recent date?

Use INDEX/MATCH: =INDEX(C2:C100,MATCH(MAXIFS(B2:B100,A2:A100,E2),B2:B100,0)) retrieves the value in column C from the row with the latest date.

More on Lookups (any direction)

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: