Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kcmtnbiker
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David McRitchie
 
Posts: n/a
Default Sorting Parent Child

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

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" wrote in message ...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
Sorting Data in ascending order sharon2006 Excel Discussion (Misc queries) 1 March 14th 06 02:07 AM
sorting non contiguous ranges gsh20 Excel Discussion (Misc queries) 1 September 8th 05 04:50 PM
Sorting 1, 1A, 2, 2A, 3, 4, 4A, 4B . . . agc1234 Excel Discussion (Misc queries) 6 May 26th 05 08:02 PM
Adding a KeyID column for sorting Rebecca New Users to Excel 3 February 20th 05 08:09 PM


All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"