Closed Thread
Results 1 to 12 of 12

Macro for Org Chart with Offsets

  1. #1
    Registered User
    Join Date
    01-04-2011
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Macro for Org Chart with Offsets

    Hello,

    I am trying to write a simple Macro which would look at a corporate organizational chart in Excel. The Macro would list the company name and the parent of that company in two columns. I have attached an example of the data and the desired output. The actual data will probably consist of a thousand rows or so.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro for Org Chart with Offsets

    Here's one I did a while ago. If you can put your data in this format, it may work for you.

    Push the Run button.
    Attached Files Attached Files
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-04-2011
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro for Org Chart with Offsets

    Quote Originally Posted by shg View Post
    Here's one I did a while ago. If you can put your data in this format, it may work for you.

    Push the Run button.
    Thank you, but it is not possible to get my data into a format usable with this macro. My data structure is hundreds or rows and potentially 20 columns wide.
    Last edited by vanilla_thunderrr; 01-06-2011 at 11:46 AM.

  4. #4
    Registered User
    Join Date
    01-04-2011
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro for Org Chart with Offsets

    And it will contain up to 20 columns.

    Thanks,

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro for Org Chart with Offsets

    Post a sanitized example in the actual data format.

    And it will contain up to 20 columns
    If that represents the depth of the hierarchy, it's deeper than the US federal government, from the president to the file clerks.

  6. #6
    Registered User
    Join Date
    01-04-2011
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro for Org Chart with Offsets

    Quote Originally Posted by shg View Post
    Post a sanitized example in the actual data format.


    If that represents the depth of the hierarchy, it's deeper than the US federal government, from the president to the file clerks.
    The depth is quite extensive at times. It is a corporate org structure. But it is not personnel rather it is for corporate entities. We often acquire companies at a 7th tier sub and that company itself could have 7 subs or more. Although we do not leave subsidiaries at the 15th tier (as they are reorganized) at times that is a true picture of the corporate structure.

  7. #7
    Registered User
    Join Date
    01-04-2011
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro for Org Chart with Offsets

    I think this is what you were requesting regarding sample data. As you can see one of our execs has a fascination with Greek mythology.
    Attached Files Attached Files

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro for Org Chart with Offsets

    So when I plug that data into the workbook I posted earlier, adding nothing but "employee numbers", I get this:

    Please Login or Register  to view this content.
    And push the button to see this ...

    Please Login or Register  to view this content.
    ... which looks like your hierarchy to ne.

  9. #9
    Registered User
    Join Date
    01-04-2011
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro for Org Chart with Offsets

    Thank you, I understand. But I have the structure that is generated in the output. I need to take that structure and put it into two columns like you used in your macro as the input.

  10. #10
    Registered User
    Join Date
    10-25-2011
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Macro for Org Chart with Offsets

    Hi,

    Try the following code, worked on my side with the sample data -


    Please Login or Register  to view this content.
    Last edited by warphase; 11-10-2011 at 06:58 PM.

  11. #11
    Registered User
    Join Date
    05-18-2012
    Location
    KL
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Macro for Org Chart with Offsets

    As I save the file 672816 - Org Chart #1.xls, this message appear...

    Private Warning: This document contains macros, ActiveX controls, XML expansion pack information, or Web components. These may include personal information that cannot be removed by the Document Inspector".

    How to remove this message?

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro for Org Chart with Offsets

    Chewchew,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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