CyrusTheVirus
Well-known Member
- Joined
- Jan 28, 2015
- Messages
- 749
- Office Version
- 365
- Platform
- Windows
This is the first time in my professional career that I am unable to figure out how to use features/formulas (i've never needed VBA, until maybe now) in order to solve a problem.
Basically i need to create a certain formatted hierarchical structure based on the below table. I need each supervisor to be listed in their parent's list horizontally (like the 2nd table below). If you see Joe, he oversees Paul and Karen who over see other managers, but i only want managers listed if they in fact oversee employees. For instance, Tom and Jerry don't oversee anyone, so they will be excluded from the list.
I've heard this is near impossible to do with formulas, and would be much easier be done by VBA. I'm at a loss... so, who can help with this one? Please let me know of any questions.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Supervisor[/TD]
[TD]Employee[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Paul[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Karen[/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[TD]Tom[/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[TD]Jerry[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Tony[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Terry[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Sam[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Andrew[/TD]
[/TR]
[TR]
[TD]Terry[/TD]
[TD]Samantha[/TD]
[/TR]
</tbody>[/TABLE]
Need it to turn into...
[TABLE="width: 500"]
<tbody>[TR]
[TD]Supervisor[/TD]
[TD]Oversees Manager[/TD]
[TD]Oversees Manager[/TD]
[TD]Oversees Manager[/TD]
[TD]Oversees Manager[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Paul[/TD]
[TD]Karen[/TD]
[TD]Mary[/TD]
[TD]Terry[/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Mary[/TD]
[TD]Terry[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Terry[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Basically i need to create a certain formatted hierarchical structure based on the below table. I need each supervisor to be listed in their parent's list horizontally (like the 2nd table below). If you see Joe, he oversees Paul and Karen who over see other managers, but i only want managers listed if they in fact oversee employees. For instance, Tom and Jerry don't oversee anyone, so they will be excluded from the list.
I've heard this is near impossible to do with formulas, and would be much easier be done by VBA. I'm at a loss... so, who can help with this one? Please let me know of any questions.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Supervisor[/TD]
[TD]Employee[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Paul[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Karen[/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[TD]Tom[/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[TD]Jerry[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Tony[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Terry[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Sam[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Andrew[/TD]
[/TR]
[TR]
[TD]Terry[/TD]
[TD]Samantha[/TD]
[/TR]
</tbody>[/TABLE]
Need it to turn into...
[TABLE="width: 500"]
<tbody>[TR]
[TD]Supervisor[/TD]
[TD]Oversees Manager[/TD]
[TD]Oversees Manager[/TD]
[TD]Oversees Manager[/TD]
[TD]Oversees Manager[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Paul[/TD]
[TD]Karen[/TD]
[TD]Mary[/TD]
[TD]Terry[/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Mary[/TD]
[TD]Terry[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Terry[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]