I have data that has been stacked prior to my receiving it. There are multiple rows of values for a single unifying ID. I'd like to convert those multiple rows into a single row by adding columns and pulling in a specified range of data. So my initial data looks like:
[TABLE="width: 345"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Subject[/TD]
[TD]Date[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bob[/TD]
[TD]Golf[/TD]
[TD]1-Mar[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Adam[/TD]
[TD]Cards[/TD]
[TD]2-Mar[/TD]
[TD]xcv[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Joe[/TD]
[TD]Cards[/TD]
[TD]5-Mar[/TD]
[TD]xch[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Will[/TD]
[TD]Travel[/TD]
[TD]6-Mar[/TD]
[TD]vvv[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Bill[/TD]
[TD]Travel[/TD]
[TD]1-Mar[/TD]
[TD]crt[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Thrill[/TD]
[TD]Travel[/TD]
[TD]2-Mar[/TD]
[TD]abt[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Napoleon[/TD]
[TD]Grapeshot[/TD]
[TD]3-Mar[/TD]
[TD]xso[/TD]
[/TR]
</tbody>[/TABLE]
And my output data should look like:
[TABLE="width: 601"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Subject[/TD]
[TD]Date[/TD]
[TD]Code[/TD]
[TD]Column1[/TD]
[TD]Column2[/TD]
[TD]Column3[/TD]
[TD]Column4[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bob[/TD]
[TD]Golf[/TD]
[TD]1-Mar[/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Adam[/TD]
[TD]Cards[/TD]
[TD]2-Mar[/TD]
[TD]xcv[/TD]
[TD]Joe[/TD]
[TD]Cards[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Will[/TD]
[TD]Travel[/TD]
[TD]6-Mar[/TD]
[TD]vvv[/TD]
[TD]Bill[/TD]
[TD]Travel[/TD]
[TD]Thrill[/TD]
[TD]Travel[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Napoleon[/TD]
[TD]Grapeshot[/TD]
[TD]3-Mar[/TD]
[TD]xso[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Ideally, I'd like to see the macro two ways- in this case, it's pulling from a range of columns that are together (B:C). However, I'd also like to see it if the columns needed were not consecutive (B and E for example).
Thanks for any help, appreciate it!!
[TABLE="width: 345"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Subject[/TD]
[TD]Date[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bob[/TD]
[TD]Golf[/TD]
[TD]1-Mar[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Adam[/TD]
[TD]Cards[/TD]
[TD]2-Mar[/TD]
[TD]xcv[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Joe[/TD]
[TD]Cards[/TD]
[TD]5-Mar[/TD]
[TD]xch[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Will[/TD]
[TD]Travel[/TD]
[TD]6-Mar[/TD]
[TD]vvv[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Bill[/TD]
[TD]Travel[/TD]
[TD]1-Mar[/TD]
[TD]crt[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Thrill[/TD]
[TD]Travel[/TD]
[TD]2-Mar[/TD]
[TD]abt[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Napoleon[/TD]
[TD]Grapeshot[/TD]
[TD]3-Mar[/TD]
[TD]xso[/TD]
[/TR]
</tbody>[/TABLE]
And my output data should look like:
[TABLE="width: 601"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Subject[/TD]
[TD]Date[/TD]
[TD]Code[/TD]
[TD]Column1[/TD]
[TD]Column2[/TD]
[TD]Column3[/TD]
[TD]Column4[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bob[/TD]
[TD]Golf[/TD]
[TD]1-Mar[/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Adam[/TD]
[TD]Cards[/TD]
[TD]2-Mar[/TD]
[TD]xcv[/TD]
[TD]Joe[/TD]
[TD]Cards[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Will[/TD]
[TD]Travel[/TD]
[TD]6-Mar[/TD]
[TD]vvv[/TD]
[TD]Bill[/TD]
[TD]Travel[/TD]
[TD]Thrill[/TD]
[TD]Travel[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Napoleon[/TD]
[TD]Grapeshot[/TD]
[TD]3-Mar[/TD]
[TD]xso[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Ideally, I'd like to see the macro two ways- in this case, it's pulling from a range of columns that are together (B:C). However, I'd also like to see it if the columns needed were not consecutive (B and E for example).
Thanks for any help, appreciate it!!