Hey Guys,
I've been trying to figure this out but could really use some help. I have an output file from a machine that comes in a long list in column A. I'm trying to write a vba macro that goes through the list and moves a varying length section (based on header) to the next available row.
For example, if I have the list below, I want to move all the buckets to separate columns.
[TABLE="width: 88"]
<colgroup><col width="88" style="width:66pt"> </colgroup><tbody>[TR]
[TD="width: 88"][bucket_1[/TD]
[/TR]
[TR]
[TD]apple=1[/TD]
[/TR]
[TR]
[TD]banana=1[/TD]
[/TR]
[TR]
[TD]carrot=1[/TD]
[/TR]
[TR]
[TD][bucket_2[/TD]
[/TR]
[TR]
[TD]apple=1[/TD]
[/TR]
[TR]
[TD]carrot=1[/TD]
[/TR]
[TR]
[TD]pearl=0[/TD]
[/TR]
[TR]
[TD]jam=1[/TD]
[/TR]
[TR]
[TD]coffee=1[/TD]
[/TR]
[TR]
[TD]rock=1[/TD]
[/TR]
[TR]
[TD][bucket_3[/TD]
[/TR]
[TR]
[TD]apple=0[/TD]
[/TR]
[TR]
[TD]banana=0[/TD]
[/TR]
[TR]
[TD]carrot=1[/TD]
[/TR]
[TR]
[TD]pearl=1[/TD]
[/TR]
[TR]
[TD]jam=1[/TD]
[/TR]
[TR]
[TD]coffee=0[/TD]
[/TR]
[TR]
[TD]rock=1[/TD]
[/TR]
[TR]
[TD][bucket_4[/TD]
[/TR]
[TR]
[TD]apple=1[/TD]
[/TR]
[TR]
[TD]banana=1[/TD]
[/TR]
[TR]
[TD]pearl=0[/TD]
[/TR]
[TR]
[TD]coffee=0[/TD]
[/TR]
[TR]
[TD="class: xl63"][bucket_5[/TD]
[/TR]
[TR]
[TD]apple=0[/TD]
[/TR]
[TR]
[TD]banana=0[/TD]
[/TR]
[TR]
[TD]carrot=0[/TD]
[/TR]
[TR]
[TD]pearl=1[/TD]
[/TR]
[TR]
[TD]jam=0[/TD]
[/TR]
[TR]
[TD]coffee=0[/TD]
[/TR]
[TR]
[TD]rock=0[/TD]
[/TR]
[TR]
[TD]Friday=1[/TD]
[/TR]
</tbody>[/TABLE]
What I think that I need is to loop from the bottom and cut and paste when the loop finds the Bucket... but Im not super sure how in VBA. Any help would be Amazing!
I've been trying to figure this out but could really use some help. I have an output file from a machine that comes in a long list in column A. I'm trying to write a vba macro that goes through the list and moves a varying length section (based on header) to the next available row.
For example, if I have the list below, I want to move all the buckets to separate columns.
[TABLE="width: 88"]
<colgroup><col width="88" style="width:66pt"> </colgroup><tbody>[TR]
[TD="width: 88"][bucket_1[/TD]
[/TR]
[TR]
[TD]apple=1[/TD]
[/TR]
[TR]
[TD]banana=1[/TD]
[/TR]
[TR]
[TD]carrot=1[/TD]
[/TR]
[TR]
[TD][bucket_2[/TD]
[/TR]
[TR]
[TD]apple=1[/TD]
[/TR]
[TR]
[TD]carrot=1[/TD]
[/TR]
[TR]
[TD]pearl=0[/TD]
[/TR]
[TR]
[TD]jam=1[/TD]
[/TR]
[TR]
[TD]coffee=1[/TD]
[/TR]
[TR]
[TD]rock=1[/TD]
[/TR]
[TR]
[TD][bucket_3[/TD]
[/TR]
[TR]
[TD]apple=0[/TD]
[/TR]
[TR]
[TD]banana=0[/TD]
[/TR]
[TR]
[TD]carrot=1[/TD]
[/TR]
[TR]
[TD]pearl=1[/TD]
[/TR]
[TR]
[TD]jam=1[/TD]
[/TR]
[TR]
[TD]coffee=0[/TD]
[/TR]
[TR]
[TD]rock=1[/TD]
[/TR]
[TR]
[TD][bucket_4[/TD]
[/TR]
[TR]
[TD]apple=1[/TD]
[/TR]
[TR]
[TD]banana=1[/TD]
[/TR]
[TR]
[TD]pearl=0[/TD]
[/TR]
[TR]
[TD]coffee=0[/TD]
[/TR]
[TR]
[TD="class: xl63"][bucket_5[/TD]
[/TR]
[TR]
[TD]apple=0[/TD]
[/TR]
[TR]
[TD]banana=0[/TD]
[/TR]
[TR]
[TD]carrot=0[/TD]
[/TR]
[TR]
[TD]pearl=1[/TD]
[/TR]
[TR]
[TD]jam=0[/TD]
[/TR]
[TR]
[TD]coffee=0[/TD]
[/TR]
[TR]
[TD]rock=0[/TD]
[/TR]
[TR]
[TD]Friday=1[/TD]
[/TR]
</tbody>[/TABLE]
What I think that I need is to loop from the bottom and cut and paste when the loop finds the Bucket... but Im not super sure how in VBA. Any help would be Amazing!