How to Return the Latest Date Using MAXIFS or INDEX MATCH
Question details
The user needs to retrieve the most recent effective date for a specific individual when the source data contains multiple entries for the same person.
- Product
- Spreadsheets
- Device & OS
- not provided
- Scenario
- Searching for a person's most recent record in a dataset containing duplicate names or IDs.
- Observed behavior
- Standard INDEX and MATCH functions only return the first matching date they encounter, rather than the latest one.
Ensure that the dates in your source column are formatted as actual date values, not text strings. Also, verify that the lookup values like names or ID numbers match exactly without trailing spaces.
Use the MAXIFS Function to Find the Latest Date
MAXIFS is the most direct way to find the maximum value (latest date) based on one or multiple criteria without needing complex array formulas.
Click on the cell where you want the latest date to appear.
Type the formula =MAXIFS($D$2:$D$7, $A$2:$A$7, F2, $B$2:$B$7, G2), adjusting the ranges for your specific Date column and Criteria columns.
Press Enter. If the result appears as a standard number, format the cell as a Date using the Number Format dropdown in the Home tab.
Combine MAX and FILTER Functions
If you prefer dynamic arrays or need more complex filtering logic, nesting the FILTER function inside the MAX function works perfectly.
Use Advanced Formulas Effortlessly in WPS Spreadsheet
WPS Spreadsheet fully supports modern functions like MAXIFS, FILTER, and dynamic arrays to help you manipulate complex data with ease.
- 1. Open your dataset: Launch WPS Spreadsheet and open your workbook containing the duplicate records.
- 2. Use the formula bar: Select a cell and type =MAXIFS( or =FILTER( to access the built-in syntax guides.
- 3. Select ranges: Easily click and drag across your criteria and date ranges to populate the formula automatically.

Frequently Asked Questions
Why does my MAXIFS formula return a zero?
A result of 0 usually means that there are no matches for your criteria, or the dates in your source range are stored as text rather than valid spreadsheet dates.
Can I use VLOOKUP or INDEX MATCH to find the latest date?
Standard VLOOKUP or INDEX MATCH formulas stop at the first match they find. To get the latest date using those functions, you must sort the source data in descending order by date first. Otherwise, it is better to use MAXIFS.
Should I match by name or ID number?
It is always better to use a unique identification number. Names can have inconsistent capitalization, typos, or duplicates (e.g., two people named John Smith), which can cause lookup errors.




