Need Help Deleteing 1 row from each group of Data

TobyStuder

New Member
Joined
Jul 16, 2018
Messages
2
I know my mind is blocked on this but i don't know where to even start. I have a dataset that is for employee travel that when this pay code is used you get paid for all days except the last one. i have been able to filter out the paycode and now have one line for each employee each day. My issue now is how do I remove 1 row. They may work this job 1 to 7 days. if they work it 1 day of course that is not removed but if they work 2 or more the last day is removed.

Example:

11ALLJEF8/13/2018
11ALLJEF8/14/2018
11ALLJEF8/15/2018
11ALLJEF8/16/2018
11ALLJEF8/17/2018
11BECJAI8/13/2018
11BECJAI8/14/2018
11BECJAI8/15/2018
11BECJAI8/16/2018
11BECJAI8/17/2018

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

for these two employees would both have the 8/17/2018 rows removed. So, i have 27 different employees to anaylze. Here is the whole dataset

EmployeeDateJobCost CodeUnitsPay ID
11ALLJEF8/13/201811-17-702206-0451.00553
11ALLJEF8/14/201811-17-702206-0451.00553
11ALLJEF8/15/201811-17-702206-0451.00553
11ALLJEF8/16/201811-17-702206-0451.00553
11ALLJEF8/17/201811-17-702206-0451.00553
11BECJAI8/13/201811-17-706406-0451.00553
11BECJAI8/14/201811-17-706406-0451.00553
11BECJAI8/15/201811-17-706406-0451.00553
11BECJAI8/16/201811-17-706406-0451.00553
11BECJAI8/17/201811-17-706406-0451.00553
11BECJOR8/13/201811-17-706407-0451.00553
11BECJOR8/14/201811-17-706407-0451.00553
11BECJOR8/15/201811-17-706406-0451.00553
11BECJOR8/16/201811-17-706406-0451.00553
11BECJOR8/17/201811-17-706406-0451.00553
11BECJUA8/13/201811-17-706406-0451.00553
11BECJUA8/14/201811-17-706406-0451.00553
11BECJUA8/15/201811-17-706406-0451.00553
11BECJUA8/16/201811-17-706406-0451.00553
11BECJUA8/17/201811-17-706406-0451.00553
11CANDAN8/13/201811-17-706406-0451.00553
11CANDAN8/14/201811-17-706406-0451.00553
11CANDAN8/15/201811-17-706406-0451.00553
11CANDAN8/16/201811-17-706406-0451.00553
11CANDAN8/17/201811-17-706406-0451.00553
11CERJOE8/13/201811-17-705305-0451.00553
11CERJOE8/14/201811-17-705305-0351.00553
11CERJOE8/15/201811-17-705305-0351.00553
11CERJOE8/16/201811-17-705305-0351.00553
11CERJOE8/17/201811-17-705305-0351.00553
11DIESAN8/13/201811-17-700918-0501.00553
11DIESAN8/14/201811-17-700918-8021.00553
11DIESAN8/15/201811-17-700918-8021.00553
11DIESAN8/16/201811-17-700918-8021.00553
11DIESAN8/17/201811-17-700918-8021.00553
11DIZFRA8/13/201811-17-702206-0451.00553
11DIZFRA8/14/201811-17-702206-0451.00553
11DIZFRA8/15/201811-17-702206-0451.00553
11DIZFRA8/16/201811-17-702206-0451.00553
11DIZFRA8/17/201811-17-702206-0451.00553
11FUNNAT8/13/201811-17-702206-0451.00553
11FUNNAT8/14/201811-17-702206-0451.00553
11FUNNAT8/15/201811-17-702206-0451.00553
11FUNNAT8/16/201811-17-702206-0451.00553
11FUNNAT8/17/201811-17-702206-0451.00553
11GARFER8/13/201811-17-705605-2041.00553
11GARFER8/14/201811-17-705605-0451.00553
11GARFER8/15/201811-17-705605-0451.00553
11GARFER8/16/201811-17-705605-0451.00553
11GARFER8/17/201811-17-705605-0451.00553
11GARFER8/18/201811-17-705605-0451.00553
11GILJOH8/13/201811-17-706406-2041.00553
11GILJOH8/14/201812-14-443406-0501.00553
11GILJOH8/15/201811-17-706406-0451.00553
11GILJOH8/16/201811-17-706406-0501.00553
11GILJOH8/17/201811-17-706406-0451.00553
11GUTEDU8/13/201811-18-801817-0501.00553
11GUTEDU8/14/201811-18-801805-0451.00553
11GUTEDU8/15/201811-18-801805-0451.00553
11GUTEDU8/16/201811-18-801805-0451.00553
11GUTEDU8/17/201811-18-801805-0451.00553
11GUTPOR8/13/201811-18-801805-2141.00553
11GUTPOR8/14/201811-18-801805-0451.00553
11GUTPOR8/15/201811-18-801805-0451.00553
11GUTPOR8/16/201811-18-801805-0451.00553
11GUTPOR8/17/201811-18-801805-0451.00553
11HOFDAN8/13/201811-17-702206-0451.00553
11HOFDAN8/14/201811-17-702206-0451.00553
11HOFDAN8/15/201811-17-702206-0451.00553
11HOFDAN8/16/201811-17-702206-0451.00553
11HOFDAN8/17/201811-17-702206-0451.00553
11ITZEGA8/13/201811-17-700917-8041.00553
11ITZEGA8/14/201811-17-700918-8021.00553
11ITZEGA8/15/201811-17-700918-8021.00553
11ITZEGA8/16/201811-17-700918-8021.00553
11ITZEGA8/17/201811-17-700918-8021.00553
11LOPEJO8/13/201811-17-705305-0451.00553
11LOPEJO8/14/201811-17-705305-0351.00553
11LOPEJO8/15/201811-17-705305-0351.00553
11LOPEJO8/16/201811-17-705305-0351.00553
11LOPEJO8/17/201811-17-705305-0351.00553
11MARMJO8/13/201811-17-702206-0451.00553
11MARMJO8/14/201811-17-702206-0451.00553
11MARMJO8/15/201811-17-702206-0451.00553
11MARMJO8/16/201811-17-702206-0451.00553
11MARMJO8/17/201811-17-702206-0451.00553
11MONALB8/13/201811-17-705305-0501.00553
11MONALB8/14/201811-17-705305-0351.00553
11MONALB8/15/201811-17-705305-0351.00553
11MONALB8/16/201811-17-705305-0351.00553
11MONALB8/17/201811-17-705305-0351.00553
11NEGJON8/13/201811-17-705305-0351.00553
11NEGJON8/14/201811-17-705305-0351.00553
11NEGJON8/15/201811-17-705305-0351.00553
11NEGJON8/16/201811-17-705305-0351.00553
11NEGJON8/17/201811-17-705305-0351.00553
11ORTJEN8/13/201811-17-705605-0451.00553
11ORTJEN8/14/201811-17-705605-0451.00553
11ORTJEN8/15/201811-17-705605-0451.00553
11ORTJEN8/16/201811-17-705605-0451.00553
11ORTJEN8/17/201811-17-705605-0451.00553
11ORTJEN8/18/201811-17-705605-0451.00553
11ROBJOS8/13/201811-17-705605-0451.00553
11ROBJOS8/14/201811-17-705605-0451.00553
11ROBJOS8/15/201811-17-705605-0451.00553
11ROBJOS8/16/201811-17-705605-0451.00553
11ROBJOS8/17/201811-17-705605-0451.00553
11ROBJOS8/18/201811-17-705605-0451.00553
11ROBSTE8/13/201811-17-706406-0501.00553
11ROBSTE8/14/201812-14-443406-0501.00553
11ROBSTE8/15/201811-17-706406-0451.00553
11ROBSTE8/16/201811-17-706406-0451.00553
11ROBSTE8/17/201811-17-706406-0451.00553
11SALEDW8/13/201811-18-801805-0451.00553
11SALEDW8/14/201811-18-801805-0451.00553
11SALEDW8/15/201811-18-801805-0451.00553
11SALEDW8/16/201811-18-801805-0451.00553
11SALEDW8/17/201811-18-801805-0451.00553
11SBRDAN8/13/201811-17-702206-0501.00553
11SBRDAN8/14/201811-17-702206-0451.00553
11SBRDAN8/15/201811-17-702206-0451.00553
11SBRDAN8/16/201811-17-702206-0451.00553
11SBRDAN8/17/201811-17-702206-0451.00553
11VERCRU8/13/201811-17-700905-0451.00553
11VERCRU8/14/201811-17-700918-8021.00553
11VERCRU8/15/201811-17-700918-8021.00553
11VERCRU8/16/201811-17-700918-8021.00553
11VERCRU8/17/201811-17-700918-8021.00553
11WRIJAS8/13/201811-17-702206-0451.00553
11WRIJAS8/14/201811-17-702206-0451.00553
11WRIJAS8/15/201811-17-702206-0451.00553
11WRIJAS8/16/201811-17-702206-0451.00553
11WRIJAS8/17/201811-17-702206-0451.00553
11MEDAUG8/13/201811-17-705605-0451.00553
11MEDAUG8/14/201811-17-705605-0451.00553
11MEDAUG8/15/201811-17-705605-0451.00553
11MEDAUG8/16/201811-17-705605-0451.00553
11MEDAUG8/17/201811-17-705605-0451.00553
11FERSER8/13/201811-18-801805-0451.00553
11FERSER8/14/201811-18-801805-0451.00553
11FERSER8/15/201811-18-801805-0451.00553
11FERSER8/16/201811-18-801805-0451.00553
11FERSER8/17/201811-18-801805-0451.00553

<colgroup><col><col><col><col span="3"></colgroup><tbody>
</tbody>

any help or ideas would be awsome. I have looked all over the internet and haven't found anything helpful yet. I have never posted on one of these boards so please let me know what else is needed.

Regards,
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Welcome to the forum Toby

With your values in Columns A:F try this in G2 copy down

=IF(COUNTIF(A:A,A2)=1,"",IF(MAXIFS(B:B,A:A,A2)=B2,"XX",""))
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,976
Members
449,095
Latest member
Mr Hughes

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