Mattheus
08-28-2019, 08:53 AM
In my organization, I receive reports of employee training. These reports show every employee who has been enrolled in the training and their training completion status. Problems arise when people get enrolled in our training more than once. If that happens, the employee shows up multiple times and with different statuses. These statuses are either Dropped, Enrolled, Complete, or In-Progress. I have attached an example of the report.
I am trying to get Excel VBA to automatically clean up this data so I end up with a list that only shows each employee once. If they have completed the training, I don’t need to see that they have also been dropped from the training.
Is it possible to create a macro that will look at each employee and their status, and then make a decision to delete all the duplicates of an employee if they have already completed the training? I’ve been able to make it delete all of the instances where the employee has multiples of the same status with this code:
ActiveSheet.Range("$A$1:$I$950").RemoveDuplicates Columns:=Array(2, 8), Header:=xlYes
That still leaves me with duplicates if they have more than one status. Haven’t been able to find any posts about this topic close enough to work for me.
In short, I am trying to create a VBA macro in Excel that will look at any duplicates of rows based on certain criteria. If there is a duplicate of an individual, I want the code to look at the different statuses of their training completion and make a decision on which to delete.
Thanks in advance!
I am trying to get Excel VBA to automatically clean up this data so I end up with a list that only shows each employee once. If they have completed the training, I don’t need to see that they have also been dropped from the training.
Is it possible to create a macro that will look at each employee and their status, and then make a decision to delete all the duplicates of an employee if they have already completed the training? I’ve been able to make it delete all of the instances where the employee has multiples of the same status with this code:
ActiveSheet.Range("$A$1:$I$950").RemoveDuplicates Columns:=Array(2, 8), Header:=xlYes
That still leaves me with duplicates if they have more than one status. Haven’t been able to find any posts about this topic close enough to work for me.
In short, I am trying to create a VBA macro in Excel that will look at any duplicates of rows based on certain criteria. If there is a duplicate of an individual, I want the code to look at the different statuses of their training completion and make a decision on which to delete.
Thanks in advance!