printing only certain cells

deanl33069

Board Regular
Joined
May 2, 2019
Messages
120
I have a spread sheet where i need to print cells a1-p4 and b6-p461 but not A6-a461
any thoughts.....
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
It occurs to me to put the cell blank and the color of the letter in white, print and then return the cell to its color.


Code:
Sub Print_withoutrange()
    
    Set r = Range("A6:A461")
    With r.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .ThemeColor = xlThemeColorDark1
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    With r.Font
        .ThemeColor = xlThemeColorDark1
        .TintAndShade = 0
    End With
    '
[COLOR=#0000ff]    ActiveSheet.PrintOut[/COLOR]
    '
    With r.Interior
        .Pattern = xlNone
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    With r.Font
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
    End With
End Sub

-------
It would look something like that

16173530c55d2eab39b5dc58018d7f15.jpg
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,664
Members
448,976
Latest member
sweeberry

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