How to filter multiple entries based on latest date?

benobee

New Member
Joined
Jul 7, 2002
Messages
44
Hi there

I have a spreadsheet of about 2000+ rows. Each row contains a number of columns, but the 2 key columns are the following:

Customer ID
Date

For each customer ID, there will be multiple rows for that customer, each row being a record of information of why they had contacted us.

However, I would like to filter this spreadsheet based on the latest entry only for each customer.

Is this doable without a macro? (i'm not great with macros). If so, how? If not, then so be it, but could you help illustrate how the macro would look please?

Any help would be much appreciated.

Many thanks in advance!

Kind Regards

benobee
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
First sort on ID and Date, then filter on ID.


  • Select All your Data
  • Select from the menu: Data\Sort
    • Sort by ID then by Date Descending
    • This will group like IDs together with the most recent at the top of each ID group.
  • Then select the ID column
  • Select from the menu; Data\Filter\Advanced Filter
    • Filter the List in Place
    • Unique Records Only
    • This will show only the first record for each ID which is the most recent.
 
Upvote 0
First sort on ID and Date, then filter on ID.


  • Select All your Data
  • Select from the menu: Data\Sort
    • Sort by ID then by Date Descending
    • This will group like IDs together with the most recent at the top of each ID group.
  • Then select the ID column
  • Select from the menu; Data\Filter\Advanced Filter
    • Filter the List in Place
    • Unique Records Only
    • This will show only the first record for each ID which is the most recent.

Fabulous, worked a treat. Many thanks!!
 
Upvote 0
First sort on ID and Date, then filter on ID.


  • Select All your Data
  • Select from the menu: Data\Sort
    • Sort by ID then by Date Descending
    • This will group like IDs together with the most recent at the top of each ID group.
  • Then select the ID column
  • Select from the menu; Data\Filter\Advanced Filter
    • Filter the List in Place
    • Unique Records Only
    • This will show only the first record for each ID which is the most recent.
Registered to say that this solution also worked for me.
I needed to identify the stock movimentation's "last date" in our ERP, from 162 different Product_IDs. I also needed the data contained throughout the row that the date was placed in, and this solution was perfect.

Thanks for the help.
 
Upvote 0

Forum statistics

Threads
1,221,577
Messages
6,160,610
Members
451,657
Latest member
Ang24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top