Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default How to start this Line List

I need to figure out how to write a loop that will do the
following things. I need to arrange a spreadsheet that
contains information on lines into an ordered fashion.
The first column says the line number. The next three
columns tell the children of the line. For example if
101, 102, and 103 are connected to 100, 100 would be
listed with three children (101, 102, and 103). Here is
what the file looks like if 101, 102, and 103 also had
children.

This file would denote line 100 as the starting line.
100 branches into three other lines (101, 102, and 103).
101 branches into 104. 104 has no children. 102 then
branches itno 105 and 106. Etc...

The before file would look like this:

Line Child Child Child
100 101 102 103
107
105
102 105 106
103 107
104
106
101 104


The after file would like this:

Line Child Child Child
100 101 102 103
101 104
104
102 105 106
105
106
103 107
107

I need to write a loop that will pick the first child and
list it next.
Then it will list that child's children next. If it
doesn't have any children, it will go back to the last
child that hasn't been listed and go from there. Like I
said, the file that I listed is organized in the fashion
that I need. I don't know what types of loops to write
or how to get started.

I already wrote the program to move the
first line to the top. It does that from other data that
I haven't listed. That is why line 100 is at the top in
both. These aren't the exact files. The real file is
much bigger, but if I can get a program to work for this
little line, it will work for the big one. Thank you so
very much.

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
How do I start the line graph at 0 on the x axis instead of 1? Jo Charts and Charting in Excel 2 April 30th 23 12:25 PM
Need macro to start at a new line MHenderson Excel Worksheet Functions 2 November 2nd 07 04:00 PM
How do you start a new line within a cell? [email protected] New Users to Excel 4 August 12th 05 02:39 PM
when displaying formulas, how to start a new line in the same cel. EL Excel Discussion (Misc queries) 1 December 7th 04 07:18 AM
Macro to Start on a New Line Each Time Rob Miller Excel Programming 1 January 8th 04 03:58 PM


All times are GMT +1. The time now is 02:08 PM.

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

About Us

"It's about Microsoft Excel"