Function Problems

Excel Formula to Return the Most Recent Entry by Date

Steve KSteve K Nov 18, 2026 869 views

Question details

Find the most recent date in a column and return the corresponding tracking value or row.

Return the Most Recent Entry by Date in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet stores dates in column A and medical or tracking values in columns P through U.
Observed behavior
The desired result is the value or data row associated with the latest date, even if the records are not sorted.
Before you start

Make sure column A contains at least one valid Excel date rather than dates stored as text. Adjust the row ranges in the formulas to match your data, and keep the date and return ranges aligned.

Solution 1Recommended

Return the First Matching Row with XLOOKUP

Use this method in Microsoft 365 to return columns P through U for the first row with the latest date.

1
Select an output cell

Click an empty cell with enough blank space to its right for six returned columns.

2
Enter the formula

In the selected cell, enter =XLOOKUP(MAX(A2:A5000),A2:A5000,P2:U5000) and press Enter.

Return the First Matching Row with XLOOKUP
Duplicate latest dates: XLOOKUP returns the first matching row by default. Use FILTER if you need every row with the latest date.
Find the latest record

Return the Latest Entry in WPS Spreadsheet

Use MAX, MATCH, and INDEX in WPS Spreadsheet to find the latest date and return values from the matching row.

  1. 1. Open the workbook: Open WPS Spreadsheet and select Open to choose your workbook.
  2. 2. Check the dates: Review column A and make sure its entries are valid spreadsheet dates.
  3. 3. Enter the formula: Select an empty cell and enter =INDEX(P$2:P$5000,MATCH(MAX($A$2:$A$5000),$A$2:$A$5000,0)), then press Enter.
  4. 4. Copy across: Drag the formula cell's fill handle to the right to return values from additional columns.
Find the latest tracking value without sorting the worksheetCopy the formula across to return multiple columnsOpen and edit Microsoft Excel XLSX and XLS filesWork with a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Does XLOOKUP return all rows with the latest date?

No. XLOOKUP returns the first match by default. To return all matching rows from columns P through U, use =FILTER(P2:U5000,A2:A5000=MAX(A2:A5000)).

What if my dates are stored as text?

Convert them to real Excel dates before using MAX. For example, select column A and use Data > Text to Columns, choosing an appropriate date format in the final step.

How do I return just one value instead of the whole row?

Use =INDEX(P2:P5000,MATCH(MAX(A2:A5000),A2:A5000,0)) to return the column P value from the first row with the latest date.

Why does my FILTER formula show a spill error?

The output area may contain data. Clear the cells below and to the right of the formula so Excel can display all matching rows.