I was given a project to go through each employee ID going back to the first employee and see when they switched from union to nonunion. Below is an example of my spreadsheet. Using VBA, what code would I be able to use to go through each EE# and determine when they switch to union codes 99, 87, and 88. Untimely, I want to only keep the EE# that went to those union codes and delete the EE that dont have these union codes. Any assistance could help. I have over 300K of lines so going one EE at a time wouldnt work.
<colgroup><col><col><col></colgroup><tbody>
</tbody>
EE# | Hire Date | Union Code |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 58C |
14 | 7/10/1998 | 8 |
14 | 7/10/1998 | 8 |
14 | 7/10/1998 | 8 |
14 | 7/10/1998 | 8 |
14 | 7/10/1998 | 8 |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 28C |
25 | 3/11/1988 | 58C |
25 | 3/11/1988 | 58C |
25 | 3/11/1988 | 58C |
25 | 3/11/1988 | 8 |
25 | 3/11/1988 | 8 |
25 | 3/11/1988 | 8 |
25 | 3/11/1988 | 8 |
<colgroup><col><col><col></colgroup><tbody>
</tbody>