+ Reply to Thread
Results 1 to 7 of 7

Grouping staff hierarchy in xls

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    Eindhoven, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Grouping staff hierarchy in xls

    Hi,

    I have an xls file with ~120000 records. Each record shows the name of an employee and their manager. It also shows the "Tier" within the organisation. I would like to create a formula that allows me to count all the reports that sum up in a hierarchical tree of a "Tier-1" manager.
    I attached an example file.

    Hope you can help me out!

    Rgds,
    Peter
    Attached Files Attached Files

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Grouping staff hierarchy in xls

    How about a simple Vlookup..

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Registered User
    Join Date
    09-17-2013
    Location
    Eindhoven, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Grouping staff hierarchy in xls

    Hi,

    Not sure how that would count the number of reports. In my example file, John has three reports: 1 direct (Richard) and 2 indirect (Jeff and Mike). How to count them (especially the indrect reports..)

    Thanks for your quick reply btw!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Grouping staff hierarchy in xls

    I dont think its that simple, Debraj.

    Hi Pdk and welcome to the forum

    do you mean you want to "count" the *string* for John?
    Mike reports to Jeff who reports to Richard who reports to John? so 3 reports?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    09-17-2013
    Location
    Eindhoven, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Grouping staff hierarchy in xls

    Quote Originally Posted by FDibbins View Post
    I dont think its that simple, Debraj.

    Hi Pdk and welcome to the forum

    do you mean you want to "count" the *string* for John?
    Mike reports to Jeff who reports to Richard who reports to John? so 3 reports?
    100% spot on!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Grouping staff hierarchy in xls

    Not sure how many tiers you will have, this works for 5.

    Based on your sample, copy this to D2:H10...
    =IFERROR(INDEX($B3:$C$10,MATCH(C2,$B3:$B$10,0),2),"-")
    Then in I3, copied down...
    =COUNTIF(C2:H2,"<>-")

  7. #7
    Registered User
    Join Date
    09-17-2013
    Location
    Eindhoven, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Grouping staff hierarchy in xls

    Quote Originally Posted by FDibbins View Post
    Not sure how many tiers you will have, this works for 5.

    Based on your sample, copy this to D2:H10...
    =IFERROR(INDEX($B3:$C$10,MATCH(C2,$B3:$B$10,0),2),"-")
    Then in I3, copied down...
    =COUNTIF(C2:H2,"<>-")
    Thank you for the quick reply FDibbins!
    Unfortunately, I think, this does not work well when there are multiple people reporting directly into a certain Tier (as attached example). Correct? I think there are no more than 6 tiers to cover, but some have more then 100 direct reports.

    Nice challenge....but I have no clue how to tackle this
    Attached Files Attached Files
    Last edited by PdK77; 09-17-2013 at 04:24 PM.

+ 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. Staff Planner - How To Set Up UserForm to Generate Data into Staff & Date Spreadsheet
    By Marie Snell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2013, 11:04 PM
  2. Grouping rows as hierarchy in vba
    By Jaymerry in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-30-2011, 04:26 AM
  3. Staff Hierarchy Problem
    By ot070707 in forum Excel General
    Replies: 2
    Last Post: 10-21-2011, 01:38 AM
  4. Grouping cells as hierarchy
    By maximpinto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2009, 02:38 AM
  5. How to produce Grouping based on hierarchy list?
    By masai_chadi in forum Excel General
    Replies: 10
    Last Post: 10-06-2006, 10:57 AM

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