+ Reply to Thread
Results 1 to 3 of 3

Sorting Parent Child

  1. #1
    kcmtnbiker
    Guest

    Sorting Parent Child

    Does anyone have any ideas on how to sort parent child records within Excel?
    The child records may be up to 5 "levels" deep. I have two columns that I
    can work with, RecordID and ParentRecordID. Here is an example of what I am
    working with:

    ID ParentID Item
    1 0 General
    2 1 TPP
    3 1 Services
    4 2 Food
    5 2 Software
    6 1 Consulting
    7 5 Custom Software

    I would like to be able to sort them so that they are in a "tree view" or
    hierarch format so that all child records roll up to their respective parent.
    Thanks.

  2. #2
    Duke Carey
    Guest

    RE: Sorting Parent Child

    Excel is not very well suited for this type of thing. You can do it in SQL
    Server or MSDE by following the code at this site

    http://www.sqlmag.com/articles/index...ticleid=16123&

    The author, Itzik Ben-Gan, has written several articles about dealing with
    hierarchies and I've found his articles to be clear and very helpful

    Since I last checked this link you now have to pay to get the article. If
    you do an MSN search for his name you might find the same info elsewhere for
    free


    "kcmtnbiker" wrote:

    > Does anyone have any ideas on how to sort parent child records within Excel?
    > The child records may be up to 5 "levels" deep. I have two columns that I
    > can work with, RecordID and ParentRecordID. Here is an example of what I am
    > working with:
    >
    > ID ParentID Item
    > 1 0 General
    > 2 1 TPP
    > 3 1 Services
    > 4 2 Food
    > 5 2 Software
    > 6 1 Consulting
    > 7 5 Custom Software
    >
    > I would like to be able to sort them so that they are in a "tree view" or
    > hierarch format so that all child records roll up to their respective parent.
    > Thanks.


  3. #3
    David McRitchie
    Guest

    Re: Sorting Parent Child

    See Sorting an Outline format, Peter Huang [MSFT], programming, 2003-09-15
    http://groups.google.com/groups?thre...ngxa07.phx.gbl

    actually it's a bit unusual to see a reply from a Microsoft employee
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm


    "Duke Carey" <[email protected]> wrote in message news:[email protected]...
    > Excel is not very well suited for this type of thing. You can do it in SQL
    > Server or MSDE by following the code at this site
    >
    > http://www.sqlmag.com/articles/index...ticleid=16123&
    >
    > The author, Itzik Ben-Gan, has written several articles about dealing with
    > hierarchies and I've found his articles to be clear and very helpful
    >
    > Since I last checked this link you now have to pay to get the article. If
    > you do an MSN search for his name you might find the same info elsewhere for
    > free
    >
    >
    > "kcmtnbiker" wrote:
    >
    > > Does anyone have any ideas on how to sort parent child records within Excel?
    > > The child records may be up to 5 "levels" deep. I have two columns that I
    > > can work with, RecordID and ParentRecordID. Here is an example of what I am
    > > working with:
    > >
    > > ID ParentID Item
    > > 1 0 General
    > > 2 1 TPP
    > > 3 1 Services
    > > 4 2 Food
    > > 5 2 Software
    > > 6 1 Consulting
    > > 7 5 Custom Software
    > >
    > > I would like to be able to sort them so that they are in a "tree view" or
    > > hierarch format so that all child records roll up to their respective parent.
    > > Thanks.




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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