Remove duplicate rows but keeping the one with highest number in a another column

harrinho

New Member
Joined
Mar 10, 2017
Messages
21
Hi everyone. I've gone through this thread but unfortunately doesn't work.

What I'm trying to do, is to keep only one of multiple employee IDs; the one with the highest length of service. As per attached, I want to keep only the red highlighted rows instead of the whole bunch of data.

effective_dateemp_idfull_namelength_of_servicehire_datetenure_grouping manager_idemp_business_title
30-04-16 0:00703621John Miles5.4329-11-105-10 Years101724SMB Strategic Account Executive
31-07-16 0:00703621John Miles5.6829-11-105-10 Years101724SMB Strategic Account Executive
31-10-16 0:00703621John Miles5.9329-11-105-10 Years101724SMB Strategic Account Executive
30-04-16 0:00703778Andreas Ronson4.8813-06-114-5 Years101621Senior Account Executive (SMB)
31-07-16 0:00703778Andreas Ronson5.1313-06-115-10 Years101621Senior Account Executive (SMB)
31-10-16 0:00703778Andreas Ronson5.3813-06-115-10 Years101621Senior Account Executive (SMB)
30-04-16 0:00704287Sina Mirzad5.1314-03-115-10 Years702234Senior Account Executive (SMB)
31-07-16 0:00704287Sina Mirzad5.3814-03-115-10 Years702234Senior Account Executive (SMB)
31-10-16 0:00704287Sina Mirzad5.6314-03-115-10 Years702234Senior Account Executive (SMB)
30-04-16 0:00705704Lauren Lee4.8205-07-114-5 Years702234Account Executive (SMB)
31-07-16 0:00705704Lauren Lee5.0705-07-115-10 Years702234Account Executive (SMB)
31-10-16 0:00705704Lauren Lee5.3205-07-115-10 Years702234Account Executive (SMB)

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

Any ideas much appreciated!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
1. Sort by length of service longest to shortest.
2. Data>Remove Duplicates - check only the boxes emp_id and full_name.
 
Upvote 0
1. Sort by length of service longest to shortest.
2. Data>Remove Duplicates - check only the boxes emp_id and full_name.
Thank you very much. It works fine. The only think I had to do is sto create a unique ID concacenating emp_id and full name as I noticed there were a couple of emp_ids for different names. Therefore, I sorted as suggested and removed dups checking on on the unique_id created field. Thanks!!
 
Upvote 0
Thank you very much. It works fine. The only think I had to do is sto create a unique ID concacenating emp_id and full name as I noticed there were a couple of emp_ids for different names. Therefore, I sorted as suggested and removed dups checking on on the unique_id created field. Thanks!!
You are welcome - thanks or the reply.
 
Upvote 0

Forum statistics

Threads
1,215,972
Messages
6,128,015
Members
449,414
Latest member
sameri

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