Nested Excel Logic Mindbender

echeech

New Member
The basic problem I am working with is... "Here is a list in excel of everyone in the company (empl id in column A, supervisor id in column B)... Determine the Vice President that each person rolls up to."

Everyone has ids and I have the list of VP's; the quirk is that while some may have a VP id in the supervisor field, most have a manager's who have the VP id as their supervisor. There could be 2,3,4, etc steps up to finally roll up to the VP.

I am thinking that a loop using a flag needs to be used, but the logic and syntax are bogging me down. If a specific example is needed, I can provide. HELP!

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I'll take a look. Thanks for the quick response!

There was an error in the macro in post #5, use the one further down.

Rather than build the actual tree out, I just need to identify the ending VP, if possible in the 3rd column.

Also, I can't view the excel files for the given macro so I'm unsure of file structure so I can adjust to my simple two column file.

Thanks

I think you need only register (free) to be able to download files from there.

Alternately, the site in my signature includes contact info, you can send the file and I'll look it over.

Replies
0
Views
585
Replies
13
Views
537
Replies
7
Views
988
Replies
0
Views
1K
Replies
0
Views
493

1,211,685
Messages
6,103,289
Members
447,853
Latest member
olddutch7

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back