View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default you will be a god if you know how....

Don't you already have the child record sitting under the parent record in
column 1? Or do you mean that the sample you presented is the desired output
and the rows will not be in that sort order at the start?

Also, is the parent record number always greater than the child record
number? If so, then, you should be able to get what you need by sorting
column 2 in ascending order.

Is there a possibility of 'orphaned' records being in the data set?



"Little Pete" wrote:

no one in the company i work for knows how to sove the below

we have a register of data which use a parent / child relationship. when
you extract the data it is easy to follow if you can put it back into this
parent / child relationship, however it comes out in basically a random
order. i have the following data to go off on each record,

column 1 = child number
column 2 = parent number

you will notice that each records parent number is equal to the child number
of the above record.

what i need to some how do is sort the data so the child record sits under
the parent record.

Column 1 Column 2
000042009500 000000016150
000042150650 000042009500
000043040100 000042150650
000048469200 000043040100
000048348400 000048469200

Cheers Pete