Hi,
Short version:
Someone knows about a VBA way to structure data under indented parent-tree when parent name is on same row in columns to the left? (Se bottom example)
Long version:
This is my first post here so please let me know if I'm writing this wrong. (Tried to read rules and search for similair posts before writing this). Just started working with excel professionally an digging up old VBA knowledge and learning powerpivot/powerquery etc. so will probably be more posts
I have a excel source file containing a WBS-visualization (Merged cells) that I need to transfer to MS project. By using PowerQuery I have managed to order the data according to the example in the end of this post.
Although in order to import it to MS project I need to have subtasks under their summaries and preferable indented.
Since source data is approx 2000 rows I'm looking for a way to reduce the manual labor to achieve this.
Maybe there is away to use VBA to order the data in one column and under their summaries?
Source data is now structured so that first level is in column A, second level in B...
Best regards
Henrik Tham
Current status: (Also have "unfilled version" with empty cells until next change)
[TABLE="width: 500"]
<tbody>[TR]
[TD]A-grandgrandparent[/TD]
[TD]B-grandparent[/TD]
[TD]C-parent[/TD]
[TD]D-Child[/TD]
[TD]E-optional infant[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD]C1[/TD]
[TD]D1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD]C1[/TD]
[TD]D2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD]C2[/TD]
[TD]D3[/TD]
[TD]E1[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD]C2[/TD]
[TD]D3[/TD]
[TD]E2[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B2[/TD]
[TD]C3[/TD]
[TD]D4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B2[/TD]
[TD]C4[/TD]
[TD]D5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]B3[/TD]
[TD]C5[/TD]
[TD]D6[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Preferred Outcome:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A1[/TD]
[/TR]
[TR]
[TD]-B1[/TD]
[/TR]
[TR]
[TD]--C1[/TD]
[/TR]
[TR]
[TD]---D1[/TD]
[/TR]
[TR]
[TD]---D2[/TD]
[/TR]
[TR]
[TD]--C2[/TD]
[/TR]
[TR]
[TD]---D3[/TD]
[/TR]
[TR]
[TD]----E1[/TD]
[/TR]
[TR]
[TD]----E2[/TD]
[/TR]
[TR]
[TD]-B2[/TD]
[/TR]
[TR]
[TD]--C3[/TD]
[/TR]
[TR]
[TD]---D4[/TD]
[/TR]
[TR]
[TD]--C4[/TD]
[/TR]
[TR]
[TD]---D5[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[/TR]
[TR]
[TD]-B3[/TD]
[/TR]
[TR]
[TD]--C5[/TD]
[/TR]
[TR]
[TD]---D6[/TD]
[/TR]
</tbody>[/TABLE]
Short version:
Someone knows about a VBA way to structure data under indented parent-tree when parent name is on same row in columns to the left? (Se bottom example)
Long version:
This is my first post here so please let me know if I'm writing this wrong. (Tried to read rules and search for similair posts before writing this). Just started working with excel professionally an digging up old VBA knowledge and learning powerpivot/powerquery etc. so will probably be more posts
I have a excel source file containing a WBS-visualization (Merged cells) that I need to transfer to MS project. By using PowerQuery I have managed to order the data according to the example in the end of this post.
Although in order to import it to MS project I need to have subtasks under their summaries and preferable indented.
Since source data is approx 2000 rows I'm looking for a way to reduce the manual labor to achieve this.
Maybe there is away to use VBA to order the data in one column and under their summaries?
Source data is now structured so that first level is in column A, second level in B...
Best regards
Henrik Tham
Current status: (Also have "unfilled version" with empty cells until next change)
[TABLE="width: 500"]
<tbody>[TR]
[TD]A-grandgrandparent[/TD]
[TD]B-grandparent[/TD]
[TD]C-parent[/TD]
[TD]D-Child[/TD]
[TD]E-optional infant[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD]C1[/TD]
[TD]D1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD]C1[/TD]
[TD]D2[/TD]
[TD][/TD]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