Reporting Hierarchy - Can it be done?

sscornav

Board Regular
Joined
Mar 20, 2010
Messages
113
I need to create a report of how many contractors and employees report to each of the President's direct reports. The organization has many levels, some of the people may be 5 levels down while others report directly to them. I can't use vlookup because there are many levels. I almost need a vllokup loop, but that is beyond my capabilities. I need help generating the "Group" column. Thanks!

I start with this:
Excel Workbook
ABC
1EmployeeSupervisorType
2JoeFrankEmployee
3SallySteveContractor
4MarySteveContractor
5JeffFrankEmployee
6LaurenJeffContractor
7KarenJeffEmployee
8MikeJoeContractor
9FredFrankEmployee
10RonKarenContractor
11BurtKarenContractor
12RalphKyleEmployee
13FrankPresidentEmployee
14StevePresidentEmployee
15KylePresidentEmployee
Sheet1


I want to use a macro to generate this:
Excel Workbook
ABCD
1EmployeeSupervisorTypeGroup
2JoeFrankEmployeeFrank
3SallySteveContractorSteve
4MarySteveContractorSteve
5JeffFrankEmployeeFrank
6LaurenJeffContractorFrank
7KarenJeffEmployeeFrank
8MikeJoeContractorFrank
9FredFrankEmployeeFrank
10RonKarenContractorFrank
11BurtKarenContractorFrank
12RalphKyleEmployeeKyle
13FrankPresidentEmployeeFrank
14StevePresidentEmployeeSteve
15KylePresidentEmployeeKyle
Sheet1


So I can generate this from a Pivot:
Excel Workbook
ABCD
18
19Count of EmployeeType
20GroupContractorEmployeeGrand Total
21Frank459
22Kyle22
23Steve213
24Grand Total6814
Sheet1
 

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,939
Messages
5,508,243
Members
408,670
Latest member
lhmwnrexcel

This Week's Hot Topics

Top