close

I have a company with over 250 associates. To come into the company, a
person must be sponsored. I am working on a sponsor 'tree'. First I need to
indent a couple of spaces ... here is what it looks like right now:

Number Name
1 John Jones
2 Jane Smith
3 Don Juan
2 Jim Jones

and so on

I would like to be able to insert a cell to the left of the first 2, and two
cells to the left of the 3, and one cell to the left of the second two. The
tree branches out about 16 layers, and I need to be able to preserve who
sponsored whom. In the example, John Jones is Top Gun, and he sponsored Jane
Smith and Jim Jones, and Jane Smith sponsored Don Juan.

Any ideas?

After this, my challenge is to do it graphically, like a flow chart kind of
deal ... not sure yet.

Thanks in advance,

--Jim
Dim iLastRow As Long
Dim i As Long

iLastRow = Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
For i = 2 To iLastRow
If Cells(i, quot;Aquot;).Value gt; 1 Then
Cells(i, quot;Aquot;).Resize(, 2).Cut Cells(i, quot;Aquot;).Offset(0, Cells(i,
quot;Aquot;).Value - 1)
End If
Next i

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;Spike9458quot; gt; wrote in message
...
gt; I have a company with over 250 associates. To come into the company, a
gt; person must be sponsored. I am working on a sponsor 'tree'. First I need
to
gt; indent a couple of spaces ... here is what it looks like right now:
gt;
gt; Number Name
gt; 1 John Jones
gt; 2 Jane Smith
gt; 3 Don Juan
gt; 2 Jim Jones
gt;
gt; and so on
gt;
gt; I would like to be able to insert a cell to the left of the first 2, and
two
gt; cells to the left of the 3, and one cell to the left of the second two.
The
gt; tree branches out about 16 layers, and I need to be able to preserve who
gt; sponsored whom. In the example, John Jones is Top Gun, and he sponsored
Jane
gt; Smith and Jim Jones, and Jane Smith sponsored Don Juan.
gt;
gt; Any ideas?
gt;
gt; After this, my challenge is to do it graphically, like a flow chart kind
of
gt; deal ... not sure yet.
gt;
gt; Thanks in advance,
gt;
gt; --Jim
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()