remove duplicate email subject except the first and last email of the same subject

shafiq2

New Member
Joined
Jun 19, 2014
Messages
42
Hi,

I have exported email from outlook to excel, now I want to delete the duplicate email subject expect the first and the last email of the same subject.

any help will be much appreciated.
for Exp.

Subject Received Flag Completed Date
Report 12/09/2014 16:20 16 September 2014
Report 12/09/2014 16:05 16 September 2014
Report 12/09/2014 09:02 18 September 2014
Report 11/09/2014 17:13 16 September 2014
Report 12/09/2014 16:20 16 September 2014
Report 12/09/2014 16:05 16 September 2014
Report 12/09/2014 09:02 18 September 2014
Report 11/09/2014 17:13 16 September 2014
Action to be taken 16/09/2014 13:11 18 September 2014
Action to be taken 16/09/2014 13:07 18 September 2014
Action to be taken 15/09/2014 13:43 18 September 2014
Action to be taken 16/09/2014 13:11 18 September 2014
Action to be taken 16/09/2014 13:07 18 September 2014
Action to be taken 15/09/2014 13:43 18 September 2014

from the above email subjects I want to keep the first email with Minimum date and the last email with Maximum date and the rest to be deleted or hidden.

Regards,
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Or copy the maximaum date "Flag Completed Date" of each subject and past it next to minimum date of received of the same subject and the rest to be deleted or hidden.

For Example!
Sample of Data


SubjectReceivedFlag Completed Date
Report12/09/2014 16:2016/09/2014 00:00
Report12/09/2014 16:0516/09/2014 00:00
Report12/09/2014 09:0218/09/2014 00:00
Report11/09/2014 17:1316/09/2014 00:00
Action to be taken 16/09/2014 13:1118/09/2014 00:00
Action to be taken 16/09/2014 13:0718/09/2014 00:00
Action to be taken 15/09/2014 13:4318/09/2014 00:00

<tbody>
</tbody><colgroup><col><col><col></colgroup>

Result


SubjectReceivedFlag Completed Date
Report11/09/2014 17:1318/09/2014 00:00
Action to be taken 16/09/2014 13:0718/09/2014 00:00

<tbody>
</tbody><colgroup><col><col><col></colgroup>


Regards,
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,314
Members
449,081
Latest member
tanurai

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