Macro to move column header dates to row for each unique item

noxvoortella

New Member
Joined
Oct 11, 2017
Messages
1
Hey folks! I have columns of sales data (text), and then dates across columns as well. I want to take those dates and format them into one row so each date matches up to each row of text data. Below is a sample of some of the data, but I have 171 rows would like reformatted and dates from 8/5/2017- 8/5/2018.

Current Format:
[TABLE="width: 500"]
<tbody>[TR]
[TD]PRODUCT
[/TD]
[TD]SALES REP
[/TD]
[TD]CORP GRP
[/TD]
[TD]8/5/2017
[/TD]
[TD]8/12/2017
[/TD]
[TD]8/19/2017
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 65"]
<colgroup><col width="65"></colgroup><tbody>[TR]
[TD="width: 65"]340493
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 122"]
<colgroup><col width="122"></colgroup><tbody>[TR]
[TD="width: 122"]Cherilyn
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 172"]
<colgroup><col width="172"></colgroup><tbody>[TR]
[TD="width: 172"]Nicholas
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD][TABLE="width: 122"]
<colgroup><col width="122"></colgroup><tbody>[TR]
[TD="width: 122"]Brian
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 172"]
<colgroup><col width="172"></colgroup><tbody>[TR]
[TD="width: 172"]FSA
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Joe
[/TD]
[TD][TABLE="width: 172"]
<colgroup><col width="172"></colgroup><tbody>[TR]
[TD="width: 172"]Clemson
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD][TABLE="width: 122"]
<colgroup><col width="122"></colgroup><tbody>[TR]
[TD="width: 122"]Jerrald
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 172"]
<colgroup><col width="172"></colgroup><tbody>[TR]
[TD="width: 172"]Other - Food Svc NW/Intm
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Desired Format:
[TABLE="width: 500"]
<tbody>[TR]
[TD]PRODUCT
[/TD]
[TD]SALES REP
[/TD]
[TD]CORP GRP
[/TD]
[TD]DATE
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Cherilyn
[/TD]
[TD]Nicholas
[/TD]
[TD]8/5/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Brian
[/TD]
[TD]FSA
[/TD]
[TD]8/5/2017
[/TD]
[/TR]
[TR]
[TD]340493[/TD]
[TD]Joe
[/TD]
[TD]Clemson
[/TD]
[TD]8/5/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Jerrald
[/TD]
[TD][TABLE="width: 172"]
<tbody>[TR]
[TD="width: 172"]Other - Food Svc NW/Intm
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]8/5/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Cherilyn
[/TD]
[TD]Nicholas
[/TD]
[TD]8/12/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Brian
[/TD]
[TD]FSA
[/TD]
[TD]8/12/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Joe
[/TD]
[TD]Clemson
[/TD]
[TD]8/12/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Jerrald
[/TD]
[TD]Other - Food Svc NW/Intm
[/TD]
[TD]8/12/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Cherilyn
[/TD]
[TD]Nicholas
[/TD]
[TD]8/19/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Brian
[/TD]
[TD]FSA
[/TD]
[TD]8/19/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Joe
[/TD]
[TD]Clemson
[/TD]
[TD]8/19/2017
[/TD]
[/TR]
[TR]
[TD]340493
[/TD]
[TD]Jerrald
[/TD]
[TD]Other - Food Svc NW/Intm
[/TD]
[TD]8/19/2017
[/TD]
[/TR]
</tbody>[/TABLE]

I'm not good with VBA/Macros, but could use some help, thank you!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top