Nested Excel Logic Mindbender

echeech

New Member
Joined
Sep 15, 2009
Messages
8
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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

jbeaucaire

Well-known Member
Joined
May 8, 2002
Messages
6,012
There was an error in the macro in post #5, use the one further down.
 

echeech

New Member
Joined
Sep 15, 2009
Messages
8
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
 

jbeaucaire

Well-known Member
Joined
May 8, 2002
Messages
6,012
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.
 

Forum statistics

Threads
1,137,114
Messages
5,679,708
Members
419,852
Latest member
ddewaard17

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top