printing only certain cells

deanl33069

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

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
8,932
Office Version
2007
Platform
Windows
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

 

Forum statistics

Threads
1,082,501
Messages
5,365,942
Members
400,863
Latest member
kimtid

Some videos you may like

This Week's Hot Topics

Top