Function Problems

How to Remove Duplicate Records and Keep the Oldest Date in Excel with WPS Office

Amos GikundaAmos Gikunda Nov 13, 2026 869 views

Question details

The user needs to identify duplicate observations by a unique line-item identifier and keep only the record with the oldest associated date.

How to Remove Duplicate Records and Keep the Oldest Date in Excel with WPS Office
Product
WPS Office Spreadsheet
Device & OS
not provided
Scenario
Cleaning a worksheet where multiple rows share the same line item, and the goal is to retain the earliest record for each line item.
Observed behavior
The worksheet contains repeated line items with different dates; only the row with the oldest date should remain for each unique line item.
Before you start

Arrange your worksheet with the line-item identifier in one column and the associated date in another. Add an empty helper column and, if possible, format the data as a table so structured references are easier to use.

Solution 1Recommended

Use a MINIFS Helper Column to Identify and Delete Duplicate Rows

Use this method when you need a clear, traceable way to keep only the oldest date for each line item before deleting duplicates.

The MINIFS formula calculates the earliest date for each unique line-item identifier. Comparing that minimum date to the date in the current row returns TRUE only for the record that should be kept, making it easy to filter and delete the FALSE duplicates.

1
Add a helper column

Click the first empty column next to your data and enter a header such as Keep Oldest.

2
Enter the MINIFS formula

In the first data row of the helper column, enter =MINIFS([Date],[Line Item],[@[Line Item]])=[@Date]. If you are not using a table, use actual ranges instead, for example =MINIFS($B$2:$B$100,$A$2:$A$100,A2)=B2.

3
Fill the formula down

Press Enter, then drag the fill handle down or double-click it to apply the formula to all rows in the dataset.

4
Filter for FALSE rows

Select the helper column, go to Home > Filter, open the filter arrow, and check only FALSE.

5
Delete the visible duplicate rows

Select the visible FALSE rows, right-click the row headers, and choose Delete Row. Then clear the filter to keep only the TRUE record for each line item.

Use a MINIFS Helper Column to Identify and Delete Duplicate Rows
Verify the result: After deleting FALSE rows, each line item should appear once with the oldest associated date.
WPS Spreadsheet Tutorial

Keep the Oldest Record for Each Line Item in WPS Spreadsheet

Use WPS Spreadsheet to identify duplicate records with MINIFS, filter FALSE rows, and keep only the oldest date for each line item without losing your Excel-based workflow.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open the Excel workbook that contains the Line Item and Date columns.
  2. 2. Add the MINIFS helper column: Enter =MINIFS([Date],[Line Item],[@[Line Item]])=[@Date] in the first helper cell and fill the formula down.
  3. 3. Filter and delete FALSE rows: Use Home > Filter to show only FALSE, select the visible rows, right-click the row headers, and choose Delete Row.
  4. 4. Clear the filter and review: Clear the filter and verify that each line item has one remaining TRUE record with the oldest date.
Keeps the oldest record per line item with a simple helper-column formulaFully compatible with Excel .xlsx formulas, tables, and structured referencesFree, lightweight, and familiar spreadsheet interfaceNo need to compare dates row by row manually
microsoft office alternative - wps office

Frequently Asked Questions

Does the MINIFS method work in WPS Spreadsheet?

Yes. WPS Spreadsheet supports the MINIFS function and Excel table structured references. If you prefer, use a range formula such as =MINIFS($B$2:$B$100,$A$2:$A$100,A2)=B2.

What do TRUE and FALSE mean in the helper column?

TRUE marks the row with the oldest date for a line item. FALSE marks later duplicate rows that can be deleted.

Can I remove duplicates without adding a helper column?

You can sort by date from oldest to newest and use Data > Remove Duplicates on the identifier column, but the helper-column method is more transparent and exact.

What should I verify before deleting filtered rows?

Confirm that the filter shows only FALSE rows and that the formula returned TRUE for the oldest date in each group. Deleting visible rows in a filtered range removes only those rows.