Hi all,
I have a list of of employees with a unique number assigned to each one.
Then i have a separate list with the entire list of employees and their 1Up manager as well as their 2 Up manager.
I need a script that will look up that employee on the list, finds their 1 UP manager, checks that 1 Up manager to see if the Job Band is A otherwise keep going and look up their managers manager until it finds the person that has a Job Band A and returns that employee ID as well as on a separate column return the employee ID of the manager before him
So basically i am looking to see who the top two managers are.
See below example if we look for Stacey Party the top Manager would be Alex Burn as his Job Band is A and then 2nd top manager is Mike Freespirit
<colgroup><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
I have a list of of employees with a unique number assigned to each one.
Then i have a separate list with the entire list of employees and their 1Up manager as well as their 2 Up manager.
I need a script that will look up that employee on the list, finds their 1 UP manager, checks that 1 Up manager to see if the Job Band is A otherwise keep going and look up their managers manager until it finds the person that has a Job Band A and returns that employee ID as well as on a separate column return the employee ID of the manager before him
So basically i am looking to see who the top two managers are.
See below example if we look for Stacey Party the top Manager would be Alex Burn as his Job Band is A and then 2nd top manager is Mike Freespirit
Employee No | Last Name | First Name | Job Band | 1-up employee no. | 1-up manager name | 2-up employee no. | 2-up manager Name | Top Manager | 2nd top Manager |
37975696 | Party | Stacy | 3i | 49114594 | John Smith | 46741146 | Nikita Walter | 46740709 | 37224331 |
49114594 | John | Smith | 2 | 46741146 | Nikita Walter | 37224331 | Mike Freeespirit | 46740709 | 37224331 |
46741146 | Walter | Nikita | 1 | 37224331 | Mike Freeespirit | 46740709 | Alex Burn | 46740709 | 37224331 |
37224331 | Freespirit | Mike | C | 46740709 | Alex Burn | 46516969 | Andy Braun | 46740709 | 37224331 |
46740709 | Burn | Alex | A | 46516969 | Andy Braun | 0 |
<colgroup><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>