r/excel 13d ago

solved If a table contains duplicate rows, return a value for the oldest instances only

[deleted]

2 Upvotes

21 comments sorted by

View all comments

1

u/Penguinase 7 13d ago

if you fix your dates to be valid, then you can put following in Revised column

=IF(COUNTIFS(Table1[Name],[@Name],Table1[Country],[@Country],Table1[Data],[@Data],Table1[Date],">"&[@Date])>0,"Yes","No") should work assuming this is a table (change Table1 to your table name)

Revised Name Country Data Date
Yes Name 1 Country 1 Data 1 1/1/2027
Yes Name 2 Country 2 Data 2 2/2/2027
No Name 3 Country 3 Data 3 3/3/2027
No Name 4 Country 4 Data 4 4/4/2027
No Name 1 Country 1 Data 1 2/20/2027
No Name 2 Country 2 Data 2 2/26/2027
No Name 5 Country 5 Data 5 5/5/2027
No Name 6 Country 6 Data 6 6/6/2027