How delete the oldest dates from the sheet

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
380
Office Version
  1. 365
Platform
  1. Windows
Good morning,

In the column E "Geldig tot" there are dates. If you look at column A you see the same item codes (Artikelcode). Now I need to see only the newest date, so only one item code with the newest date. Is that possible to filter out and delete the rest?

Thank you for your time.

Book1
ABCDE
1ArtikelcodeOmschrijvingEenheidGeldig vanGeldig tot
2100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 01/07/202011/04/2021
3100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 12/04/202121/04/2021
4100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 22/04/202130/06/2021
5100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 01/07/202114/10/2021
6100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 15/10/202102/01/2022
7100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 03/01/202231/01/2022
8100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 01/02/202230/05/2022
9100000Vito Glaserfix 111 6x2 mm wit - 10x25 mpak 31/05/202231/12/2299
10100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 01/07/202011/04/2021
11100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 12/04/202122/04/2021
12100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 23/04/202130/06/2021
13100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 01/07/202114/10/2021
14100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 15/10/202102/01/2022
15100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 03/01/202231/01/2022
16100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 01/02/202230/05/2022
17100001Vito Glaserfix 111 6x2 mm zwart - 10x25 mpak 31/05/202231/12/2299
18100002Vito Glaserfix 111 6x3 mm wit - 10x25 mpak 01/07/202011/04/2021
19100002Vito Glaserfix 111 6x3 mm wit - 10x25 mpak 12/04/202130/06/2021
20100002Vito Glaserfix 111 6x3 mm wit - 10x25 mpak 01/07/202114/10/2021
21100002Vito Glaserfix 111 6x3 mm wit - 10x25 mpak 15/10/202102/01/2022
22100002Vito Glaserfix 111 6x3 mm wit - 10x25 mpak 03/01/202231/01/2022
23100002Vito Glaserfix 111 6x3 mm wit - 10x25 mpak 01/02/202230/05/2022
24100002Vito Glaserfix 111 6x3 mm wit - 10x25 mpak 31/05/202231/12/2299
25100003Vito Glaserfix 111 6x3 mm zwart - 10x25 mpak 01/07/202030/06/2021
26100003Vito Glaserfix 111 6x3 mm zwart - 10x25 mpak 01/07/202114/10/2021
27100003Vito Glaserfix 111 6x3 mm zwart - 10x25 mpak 15/10/202102/01/2022
28100003Vito Glaserfix 111 6x3 mm zwart - 10x25 mpak 03/01/202231/01/2022
29100003Vito Glaserfix 111 6x3 mm zwart - 10x25 mpak 01/02/202230/05/2022
30100003Vito Glaserfix 111 6x3 mm zwart - 10x25 mpak 31/05/202231/12/2299
Query1
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
In a separate column, let say F2:
Excel Formula:
=IFERROR(INDEX($A$2:$A$30,MATCH(0,COUNTIF($F$1:F1,$A$2:$A$30),0)),"")
G2:
Excel Formula:
=VLOOKUP($F2,$A$2:$B$30,2,0)
H2:
Excel Formula:
=VLOOKUP($F2,$A$2:$C$30,3,0)
J2:
Excel Formula:
=MAXIFS($E$2:$E$30,$A$2:$A$30,$F2)
I2:
Excel Formula:
=INDEX($D$2:$D$30,MATCH(1,($A$2:$A$30=$F2)*($E$2:$E$30=$J2),0))
 
Upvote 0
Solution
Is that possible to filter out and delete the rest?

You did not mention what kind of solution you are after. Do you just want to know how to do it via menu commands (i.e. Sort table by Col A (ascending) & Col E (descending), then use the 'remove duplicates' feature to remove the duplicates in Col A) or are you wanting to automate is some way?
 
Upvote 0
In a separate column, let say F2:
Excel Formula:
=IFERROR(INDEX($A$2:$A$30,MATCH(0,COUNTIF($F$1:F1,$A$2:$A$30),0)),"")
G2:
Excel Formula:
=VLOOKUP($F2,$A$2:$B$30,2,0)
H2:
Excel Formula:
=VLOOKUP($F2,$A$2:$C$30,3,0)
J2:
Excel Formula:
=MAXIFS($E$2:$E$30,$A$2:$A$30,$F2)
I2:
Excel Formula:
=INDEX($D$2:$D$30,MATCH(1,($A$2:$A$30=$F2)*($E$2:$E$30=$J2),0))
Thank you for your answers, this does the trick I needed.
Have a great day,

Romano
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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