Hi, I am importing data from a text file into excel.
Unfortunately the text file has stacked columns, so what would be the best way to convert the data from this:
[TABLE="width: 186"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Address[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD]Zip[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]1234 St.[/TD]
[/TR]
[TR]
[TD="align: right"]1111111[/TD]
[TD="align: right"]44444[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]5678 St.[/TD]
[/TR]
[TR]
[TD="align: right"]2222222[/TD]
[TD="align: right"]55555[/TD]
[/TR]
[TR]
[TD]Jane[/TD]
[TD]8910 St.[/TD]
[/TR]
[TR]
[TD="align: right"]3333333[/TD]
[TD="align: right"]66666[/TD]
[/TR]
</tbody>[/TABLE]
To this:
[TABLE="width: 372"]
<colgroup><col span="4"></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Number[/TD]
[TD]Address[/TD]
[TD]Zip[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]1111111[/TD]
[TD]1234 St.[/TD]
[TD="align: right"]44444[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD="align: right"]2222222[/TD]
[TD]5678 St.[/TD]
[TD="align: right"]55555[/TD]
[/TR]
[TR]
[TD]Jane[/TD]
[TD="align: right"]3333333[/TD]
[TD]8910 St.[/TD]
[TD="align: right"]66666[/TD]
[/TR]
</tbody>[/TABLE]
Wondering if I need to use some VBA or if this can be down with Power Query?
Thanks.
Unfortunately the text file has stacked columns, so what would be the best way to convert the data from this:
[TABLE="width: 186"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Address[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD]Zip[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]1234 St.[/TD]
[/TR]
[TR]
[TD="align: right"]1111111[/TD]
[TD="align: right"]44444[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]5678 St.[/TD]
[/TR]
[TR]
[TD="align: right"]2222222[/TD]
[TD="align: right"]55555[/TD]
[/TR]
[TR]
[TD]Jane[/TD]
[TD]8910 St.[/TD]
[/TR]
[TR]
[TD="align: right"]3333333[/TD]
[TD="align: right"]66666[/TD]
[/TR]
</tbody>[/TABLE]
To this:
[TABLE="width: 372"]
<colgroup><col span="4"></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Number[/TD]
[TD]Address[/TD]
[TD]Zip[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]1111111[/TD]
[TD]1234 St.[/TD]
[TD="align: right"]44444[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD="align: right"]2222222[/TD]
[TD]5678 St.[/TD]
[TD="align: right"]55555[/TD]
[/TR]
[TR]
[TD]Jane[/TD]
[TD="align: right"]3333333[/TD]
[TD]8910 St.[/TD]
[TD="align: right"]66666[/TD]
[/TR]
</tbody>[/TABLE]
Wondering if I need to use some VBA or if this can be down with Power Query?
Thanks.