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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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