Printing Macro "Advanced" help needed

ed.ayers315

Board Regular
Joined
Dec 14, 2009
Messages
166
Hello Forum goers,

I need help with building a macro to accomplish a complexed wish list.

Tried numerous other solutions and tried combining some but could not get the needed result.

I deleted rows from the worksheet so it would fit better and hopefully easier to follow; the far right explainations have the correct row numbers.

Excel 2007
B
C
D
E
F
G
H
I
J
K
Total Print Range is from B1:I210
I use a filter to hide rows that do not need to print
I use a macro found on this forum to reset the page #s when filtered.
This setion with a footer
Should be on it's own page
This section is from Rows 1-17
This section sould repeat lines 19 & 20 if more than one page.
Is it possible to set up printing so these 3 row combinations stay together and not printed on different pages
This section is from Rows 19-56
This section sould repeat lines 58 & 59 if more than one page.
Is it possible to set up printing so these 3 row combinations stay together and not printed on different pages
This section is from Rows 58-89
This section sould repeat lines 91 & 92 if more than one page.
This section sould repeat lines 97 & 98 if more than one page.
This section sould repeat lines 102 if more than one page.
This section is from Rows 102-110
This section sould repeat lines 112-114 if more than one page.
This section is from Rows 112-118
This section sould repeat lines 119-120 if more than one page.
Is it possible to set up printing so these 2 row combinations stay together and not printed on different pages
This section is from Rows 119-148
This section sould repeat lines 150-151 if more than one page.
Is it possible to set up printing so these 2 row combinations stay together and not printed on different pages
This section is from Rows 150-179
This section sould repeat lines 181-182 if more than one page.
Is it possible to set up printing so these 2 row combinations stay together and not printed on different pages
This section is from Rows 181-196
This section sould repeat lines 198-199 if more than one page.
Is it possible to set up printing so that 1 row not printed on different pages
This section is from Rows 198-208
Allways printed on the last page Row 210

<tbody>
[TD="align: center"]1
[/TD]
[TD="align: center"][/TD]

[TD="align: center"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2
[/TD]
[TD="align: center"][/TD]

[TD="align: center"][/TD]

[TD="align: right"][/TD]

[TD="align: center"]3
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]11
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]12
[/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]13
[/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]14
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]15
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]16
[/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]17
[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]18
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]19
[/TD]

[TD="align: right"][/TD]

[TD="align: center"]20
[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]21
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]22
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]23
[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]24
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]25
[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]

[TD="align: center"]26
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]27
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]28
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]29
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]30
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]31
[/TD]

[TD="align: right"][/TD]

[TD="align: center"]32
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]33
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]34
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]35
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]36
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]37
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]38
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]39
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]40
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]41
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]42
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]43
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]44
[/TD]

[TD="align: right"][/TD]

[TD="align: center"]45
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]46
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]47
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]48
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]49
[/TD]

[TD="align: right"][/TD]

[TD="align: center"]50
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]51
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]52
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]53
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]54
[/TD]

[TD="align: right"][/TD]

[TD="align: center"]55
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]56
[/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="bgcolor: #C00000, align: center"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]57
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]58
[/TD]

[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]59
[/TD]

[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]60
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]61
[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]62
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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