Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to Dynamically Set Print Area
I have filtered the number of rows and copied them to a separate area of the
worksheet. The number of rows after the filter is unknown. How do I change the Print Area range of rows to be the number of rows after the filter (otherwise I will print pages and pages of paper) Thanks, -- Jerry B |
#2
|
|||
|
|||
Select the area you want printed, then do File=PrintArea = Set Print Area
programmatically set rng = Range("AB50").CurrentRegion activesheet.pageSetup.Printarea = rng.Address(external:=True) Change AB50 to the cell that forms the top left corner of the data you want to print. -- Regards, Tom Ogilvy "Jerry B" wrote in message ... I have filtered the number of rows and copied them to a separate area of the worksheet. The number of rows after the filter is unknown. How do I change the Print Area range of rows to be the number of rows after the filter (otherwise I will print pages and pages of paper) Thanks, -- Jerry B |
#3
|
|||
|
|||
Hi Tom: Thankyou for the reply. You have given me some ideas. I should
have said this is intended to be part of a macro to filter and then print. The first row always is "copied" to A200 to T200 but the last cell to be printed is determined by the advance filter operation and is T200+number of filtered rows. I am thinking of leaving a marker in the last row and then matching to determine the row number xxx and then setting the print area to A200:Txxx in the macro if there is no easier way. Thanks again for your help. "Jerry B" wrote: I have filtered the number of rows and copied them to a separate area of the worksheet. The number of rows after the filter is unknown. How do I change the Print Area range of rows to be the number of rows after the filter (otherwise I will print pages and pages of paper) Thanks, -- Jerry B |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing - Have to set print area 1 column further than necessary | Excel Discussion (Misc queries) | |||
Changing print area | Excel Discussion (Misc queries) | |||
How do I only show print area in excel? | Excel Discussion (Misc queries) | |||
In Excel print area setup problem with 2 different computers with. | Setting up and Configuration of Excel | |||
print a specific area within a worksheet by clicking on print? | Excel Worksheet Functions |