Splitting a table and formatting problem

EPortJake

New Member
Joined
Jan 18, 2019
Messages
1
A
B
C
D
E
38
No
OP
MO
Txt
Co
39
112254
10
04 FSR
Yeah
ABB
40
114554
20
04 FLB
Whatever
ABB
41
144754
10
04 BBA
Etc
Claptrap
42
112266
40
04 KKT
Blah
Claptrap
43
123457
15
04 JJF
Blah
Claptrap
44
111365
10
04 MMN
Blah
Gardner
45
125845
100
04 FSR
Blah
Gardner
46
124655
50
04 HHY
Blah
Zeus

<tbody>
</tbody>
Hi,
I am struggling with the code needed to format a table by a common variable. The table looks like the above and is compiled in Co alphabetic order. I'm needing a macro that will split the table into common Co, put the Coname above with column titles, insert some cells below (N2:Y6) followed by a page break so it looks like this:
A
B
C
D
E
37
ABB
38
No
OP
MO
Txt
Co
39
112254
10
04 FSR
Yeah
ABB
40
114554
20
04 FLB
Whatever
ABB
41
(Paste N2:Y6 here)
42
43
44
45
(Page break below)
46
Claptrap
47
No
OP
MO
Txt
Co
48
144754
10
04 BBA
Etc
Claptrap
49
112266
40
04 KKT
Blah
Claptrap
50
123457
15
04 JJF
Blah
Claptrap
51
(Paste N2:Y6 here)
52
53
54
(Page break below)
55
Gardner
56
No
OP
MO
Txt
Co
57
111365
10
04 MMN
Blah
Gardner
58
125845
100
04 FSR
Blah
Gardner
59
(Paste N2:Y6 here)
60
61
62
(Page break below)
63
Zeus
64
No
MO
OP
Txt
Co
65
124655
50
04 HHY
Blah
Zeus
66
(Paste N2:Y6 here)
67

68
69
70
(Page break below)

<tbody>
</tbody>
Any help would be greatly appreciated. Thanks,
Jake.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,213,557
Messages
6,114,291
Members
448,564
Latest member
ED38

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