Remove duplicated pairs of data when counting time between dates

rainie

New Member
Joined
Jul 21, 2017
Messages
1
Hi all,

I need to count the total time spent for one task among various people, by counting the starting time and ending time of the sub-events.
Example here:

Event112233Time
SESESE
Alex1 Jan2 Feb 3 Mar4 Apr5 May6 JunW days
Brian2 Jan2 Feb2 Jan 2 Feb 2 Jan3 MarX days
Charles5 May 6 Jun7 Jul8 Aug9 Sep10 OctY days
Danny2 Feb2 Feb3 Mar3 Mar4 Apr4 AprZ days

<tbody>
</tbody>

**"S" represents starting time and "E" represents ending time.
"Time" represents time required for the whole task ( Event 1's E- Event 1's S + Event 2's E - Event's S+...)

However, sometimes, 2 different events can be completed in the same period, i.e. with same starting time and same ending time. We treat this as "duplicated pairs of data".

(Refer to "Brian's case, he completed both event 1 and 2 in the same period. )

Only two sets of starting date and ending dates are identical would be considered as "duplicated". If it has same starting date but different ending date, it is not being considered as "duplicated pairs of data", and vice versa.

I tried to use the Excel function (Data-->Remove Duplicates), but it checks basis on each cell but not a pair of data.

Using "Brian"'s case as example again, if I the "Remove Duplicates" function, the starting date in Event 3 will be removed as well, but I only want to remove Event 2, the identical pair of data.

I tried to create a new column for group data in S and data in E to make a new distinguishable code. ( by =S1+E1, and change it as "General' format)

Event11Group22Group 33Group Time
SESESE
Alex1 Jan2 Feb 855043 Mar4 Apr856265 May6 Jun85752W days
Brian2 Jan2 Feb855052 Jan 2 Feb 855052 Jan3 Mar85534X days
Charles5 May 6 Jun857527 Jul8 Aug858789 Sep10 Oct86005Y days
Danny2 Feb2 Feb855363 Mar3 Mar855944 Apr4 Apr85658Z days

<tbody>
</tbody>

Although this helps me to identify/ delete the duplicated data in "Group column", I still need to delete the corresponding pair of duplicated data manually, for my future counting of time.

I have a thousands of fields to check and this is not efficient to check one by one. I wanna know what can I do, to fulfill all of the below:
1) find out the duplicated PAIR of data and
2) delete the duplicated PAIR of data and
3) The deletion of duplicated PAIR of data is based on individual person, but not for whole sheet.

( For example, Alex's event 3 starting and ending date is same as Charles's event 1 one, but this should not be deleted).

Thank you!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

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