Tech Support Guy banner

Identify latest record

560 Views 12 Replies 2 Participants Last post by  crashdown
Hi :)

I have a table with the columns: Name, Date. [[Excel 2013]]

There are multiple instances of the same name, along with different dates, eg:
John Doe 19/02/19
John Doe 18/02/19
John Doe 17/02/19

i need to identify the latest date for that person. I would like another column where i can filter out previous dates.

Thanks for looking.
Not open for further replies.
1 - 13 of 13 Posts
Are you talking Excel?
Yup, i did tag as such, have updated body to match.
Is the data currently in Name and then date descending order?
If it is it would mean that the first occurrence of the name will be the one that you want.

The VBA to do what you want would be fairly simple to copy that data to another sheet or another column.

What columns are the name and dates in and what row do that start on?
A dummy worksheet would help.
Assume the data is not in any set order as the table can be filtered / sorted.

There should never be 2 records for the same person on the same date.

My aim is to have a column [Latest?] identifying Yes/No if each record has the newest date for that person.


I assume that the format that you have shown is for real?
ie the actual data starts in Column E and Row 14.

Also are the headings repeated and are there gaps in the data?
Yup, the format is as is, just removed content.

The table will lengthen as data is added, no empty rows within the table itself. Table headers are unique.
Here is the Workbook with a VBA Macro initiated by Ctrl + q.
I am not sure how you wanted the last Date identified, so I just used the word latest.


Thanks for that!

Ive given it a shot, how its working for me: ctrl+q = "latest" next to the highest name with the newest date.

Can we make it identify the newest date for each person? i.e. state "latest" next to the newest date for Fred, and for Joe, and for John?
Can you show me an example?
On the attached you can see 'latest' against the latest record for each person.

this is what im looking for, reason being, there will be a lot of records added in an ongoing way.

ctrl+q may also need include a clearing of that column and rechecking, so that the same a person doesnt have 2 'latest' records after the addition of a new one.

thanks for taking the time btw!


OK, I think this does what you want.
If you are going to just add data to the end of the current data then you need to Sort that data, or the sort needs to be included in the code.


Thanks a lot! totally what i was after!
1 - 13 of 13 Posts
Not open for further replies.