![]() |
Sponsor Tree
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 |
Sponsor Tree
Dim iLastRow As Long
Dim i As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = 2 To iLastRow If Cells(i, "A").Value 1 Then Cells(i, "A").Resize(, 2).Cut Cells(i, "A").Offset(0, Cells(i, "A").Value - 1) End If Next i -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Spike9458" wrote in message ... 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 |
All times are GMT +1. The time now is 03:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com