FMabey
asked on
Indenting in Excel VBA
Hi all,
I have the following data:
2
2.1
2.1.1
2.1.2
2.2
2.2.1
2.2.2
2.2.3
2.3
2.3.1
2.4
2.5
2.6
2.6.1
2.6.1.1
2.6.1.2
2.6.2
3
3.1
3.1.1
3.1.2
This data is the first column of a list of parent and child items, so item 3.1 belongs to 3 and item 3.1.1 belongs to item 3.1 and so on.
What I would like to do is the following, showing each parent in a separate column:
2
2.1 2
2.1.1 2.1
2.1.2 2.1
2.2 2
2.2.1 2.2
2.2.2 2.2
2.2.3 2.2
2.3 2
2.3.1 2.3
2.4 2
2.5 2
2.6 2
2.6.1 2.6
2.6.1.1 2.6.1
2.6.1.2 2.6.1
2.6.2 2.6
3
3.1 3
3.1.1 3.1
3.1.2 3.1
etc...
Has anyone got any clever ideas of how to achieve this is Excel VBA?
Thanks in advance
I have the following data:
2
2.1
2.1.1
2.1.2
2.2
2.2.1
2.2.2
2.2.3
2.3
2.3.1
2.4
2.5
2.6
2.6.1
2.6.1.1
2.6.1.2
2.6.2
3
3.1
3.1.1
3.1.2
This data is the first column of a list of parent and child items, so item 3.1 belongs to 3 and item 3.1.1 belongs to item 3.1 and so on.
What I would like to do is the following, showing each parent in a separate column:
2
2.1 2
2.1.1 2.1
2.1.2 2.1
2.2 2
2.2.1 2.2
2.2.2 2.2
2.2.3 2.2
2.3 2
2.3.1 2.3
2.4 2
2.5 2
2.6 2
2.6.1 2.6
2.6.1.1 2.6.1
2.6.1.2 2.6.1
2.6.2 2.6
3
3.1 3
3.1.1 3.1
3.1.2 3.1
etc...
Has anyone got any clever ideas of how to achieve this is Excel VBA?
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
=LEFT(A2,LEN(A2)-2)
ee.xlsx