Hi,
I need help with VBA code so that I can enter a supervisor's ID and name and then run the macro to build a complete hierarchy for that person.
Per the example below I have a list of supervisors and employees. I want to type in a supervisor's ID and name (ID "1000", Name "Person A") as o the right of the example and then need the macro to run a complete hierarchy for that person. If I did the same for "Person O" I would only see those that name and the 5 reports.
Appreciate any help!
Pieter
I need help with VBA code so that I can enter a supervisor's ID and name and then run the macro to build a complete hierarchy for that person.
Per the example below I have a list of supervisors and employees. I want to type in a supervisor's ID and name (ID "1000", Name "Person A") as o the right of the example and then need the macro to run a complete hierarchy for that person. If I did the same for "Person O" I would only see those that name and the 5 reports.
Appreciate any help!
Pieter
Supervisor ID | Supervisor Name | Person ID | Person Name | |||||||||
1000 | Person A | 1000 | Person A | |||||||||
1000 | Person A | 1001 | Person B | 1001 | Person B | |||||||
1000 | Person A | 1002 | Person C | 1004 | Person E | |||||||
1000 | Person A | 1003 | Person D | 1005 | Person F | |||||||
1001 | Person B | 1004 | Person E | 1006 | Person G | |||||||
1001 | Person B | 1005 | Person F | 1002 | Person C | |||||||
1001 | Person B | 1006 | Person G | 1007 | Person H | |||||||
1002 | Person C | 1007 | Person H | 1008 | Person I | |||||||
1002 | Person C | 1008 | Person I | 1009 | Person J | |||||||
1002 | Person C | 1009 | Person J | 1003 | Person D | |||||||
1003 | Person D | 1010 | Person K | 1010 | Person K | |||||||
1003 | Person D | 1011 | Person L | 1013 | Person N | |||||||
1003 | Person D | 1012 | Person M | 1014 | Person O | |||||||
1010 | Person K | 1013 | Person N | 1016 | Person Q | |||||||
1010 | Person K | 1014 | Person O | 1017 | Person R | |||||||
1010 | Person K | 1015 | Person P | 1018 | Person S | |||||||
1014 | Person O | 1016 | Person Q | 1019 | Person T | |||||||
1014 | Person O | 1017 | Person R | 1020 | Person U | |||||||
1014 | Person O | 1018 | Person S | 1015 | Person P | |||||||
1014 | Person O | 1019 | Person T | 1011 | Person L | |||||||
1014 | Person O | 1020 | Person U | 1012 | Person M |