+ Reply to Thread
Results 1 to 7 of 7

Match names and make hierarchy

  1. #1
    Registered User
    Join Date
    11-19-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    16

    Match names and make hierarchy

    Hello Excel Forum

    I have a worksheet with the following information:
    Column A: List of employees
    Column B: Supervisor of the employee

    Each employee has a supervisor and this supervisor also has a supervisor etc etc until we reach the CEO who obviously has no supervisor. What i want is to make an organizational hierarchy.

    Fx.

    Name: Supervisor

    Thomas Christian
    Peter Thomas
    John
    Christian John


    This hierarchy must then be: Peter, Thomas, Christian, John (with John as the top-man).

    I have about 1000 employees and therefore i need to automatize this proces. I can't get a good idea from my head. Any help would be much appreciated!

    Thank you in advance!

    Hremehre

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Match names and make hierarchy

    Here's a link to a thread I contributed to recently on company hierarchies:

    http://www.excelforum.com/excel-form...tablished.html

    Perhaps that might give you some ideas.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    11-19-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Match names and make hierarchy

    Thank you but unfortunately i did not help me much. I'm new to VBA and i think there's too many differences between my sheet and the one in the linkj you sent.
    I only have a long list of names and in the column next to it i have a list of supervisors. In a new column i have removed supervisor duplicates and found 79 supervisors. Now i want to match these 79 with the names column and see who their supervisor is and then do this again untill i reach the CEO. Any thoughts?

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Match names and make hierarchy

    See if this is what you want
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-19-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Match names and make hierarchy

    I like it and it works but it does not give me the output i need.
    I basically need the output to be the names listed in seperate cells and preferably starting from the "top-man". I actually don't care about who is the employees person but only which level they are on. (Level 1, Level 2, Level 3 down to the lowest ranked employee).
    Like this:
    Please Login or Register  to view this content.
    And if another person was the same rank as Thomas (below Christian and above Peter) it would be like this
    Please Login or Register  to view this content.
    Last edited by Hremehre; 12-06-2013 at 07:36 AM.

  6. #6
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Match names and make hierarchy

    Should do the job now.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-19-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Match names and make hierarchy

    It works brilliantly. Thank you so much for your hard work!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How and Where do I make a super complex Table hierarchy?
    By Guacamole in forum Excel General
    Replies: 5
    Last Post: 09-18-2013, 10:58 AM
  2. [SOLVED] Match names on one spreadsheet to the names on another then copy contents of another cell
    By TYOsborn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2013, 05:06 PM
  3. [SOLVED] Match names and sum the 2 values from matched names
    By score in forum Excel General
    Replies: 3
    Last Post: 09-11-2012, 01:12 AM
  4. Replies: 5
    Last Post: 05-21-2010, 04:34 PM
  5. Changing VB Component Names to match Worksheet names using VBE
    By Philip in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2005, 01:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1