Excel - removing duplicates based on a second column criteria

I have a dataset containing 3 columns.

  1. Personal ID number
  2. field of employment
  3. months of working experience in the given field of employment

I have a large number of duplicates where a person has experience in two or more fields of employment. I want to narrow down my dataset so that no personal ID has a duplicate. The criteria being the field of employment where the individual has the most experience.

My dataset looks like this:

a b c
teacher ID99999 38
teachers assistant ID99999 6

2 Answers

You can do this using a helper column in Column D.

  1. Enter this array formula in D2: =IF($C2=MAX(IF($A2=$A$2:$A$20,$C$2:$C$20,-1)),"Remain","Remove")

Note: Enter the formula with Ctrl+Shift+Enter and fill down.

  1. Filter column D by "Remove".

  2. Finally, delete the filtered rows.

This formula will find the maximum months of experience in Column C for duplicate ID's, and mark those rows with "Remain". Other rows with duplicate ID's are marked with "Remove".

enter image description here

4

Sort C column from largest to smallest.

Now remove duplicate from Data Tab-> Remove Duplicates based on B Column.

enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like