Select Entire Sheet except print area

LenPL

New Member
Joined
Aug 1, 2013
Messages
17
Hi,

I am looking for a macro or a solution to select the entire work sheet except the print area.

Thanks,

LenPL
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try this:
Code:
Sub CtrlA_Excl_PrtA()
    If ActiveSheet.PageSetup.PrintArea = "" Then Exit Sub
    Set PrtA = Range(ActiveSheet.PageSetup.PrintArea)
    Set SelA = Range(Cells(1, PrtA.Column + PrtA.Columns.Count), Cells(1, Columns.Count)).EntireColumn
    Set SelA = Application.Union(SelA, Range(PrtA.Row + PrtA.Rows.Count & ":" & Rows.Count))
    If PrtA.Column > 1 Then Set SelA = Application.Union(SelA, Range("A1", Cells(1, PrtA.Column - 1)).EntireColumn)
    If PrtA.Row > 1 Then Set SelA = Application.Union(SelA, Range("1:" & PrtA.Row - 1))
    SelA.Select
End Sub
 
Upvote 0
Perfect! Thank you Tetra.
I can't believe this isn't a standard feature or it has been discussed on 'google'.
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,849
Members
449,471
Latest member
lachbee

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