Welcome toExcel.Tips.Net
Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site
Filtering Columns for Unique Values
Printing Multiple Worksheets on a Single Page
If you have multiple areas that you print in a worksheet, you may get tired of repeatedly specifying what area you want to print and then printing it. Such a task is well suited to being done with a macro. The macro can take care of specifying a print area and then actually printing the information.
For instance, let's assume that you have two print ranges defined in your worksheet: Range1 and Range2. Further, Range1 should be printed in portrait orientation and Range2 should be printed in landscape orientation. The following macros can be used to print each of the print ranges:
Sub PrintRange1()
ActiveSheet.PageSetup.PrintArea = Range("range1").Address
ActiveSheet.PageSetup.Orientation = xlPortrait
ActiveWindow.SelectedSheets.PrintOut
End Sub
Sub PrintRange2()
ActiveSheet.PageSetup.PrintArea = Range("range2").Address
ActiveSheet.PageSetup.Orientation = xlLandscape
ActiveWindow.SelectedSheets.PrintOut
End Sub
These are very simple macros, but you get the idea—all you need to do is set up the print job in the macro, and then print from the macro itself. You could even attach the macros to toolbar buttons or to a menu option, as described in other issues of ExcelTips.
If you prefer to not use macros, you could also use the custom views feature of Excel. Simply set the print area, orientation, margins, and other settings desired. Then define this as a custom view. To define a custom view in versions of Excel prior to Excel 2007, follow these steps:
If you are using Excel 2007 you can create the custom view in this manner:
You can continue to define and save additional views, as desired. Your custom views are saved with your workbook, and you can later use them to print what you want. (Just display the custom view and then print your worksheet.)
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2703) applies to Microsoft Excel versions: 97 2000 2002 2003 2007
Organize Your Data! Using the powerful sorting capabilities of Excel can help you get your data into just the order you need. Find out how you can use the full capabilities of sorting to your benefit.