Written by Allen Wyatt (last updated January 6, 2023)
This tip applies to Excel 2007, 2010, and 2013
Ian puts together Excel workbooks that typically contain, at minimum, 30 worksheets. Each worksheet, if printed, requires a minimum of eight pages. Ian often updates the data in each worksheet that would appear on the first two printed pages of those worksheets. When it comes time to print, Ian would like a way to print just the first two pages of each worksheet.
When you select a range of worksheets and then choose to print, those worksheets are considered by Excel to be a single, contiguous print job. So, for instance, if you selected 20 worksheets and each worksheet required eight pages, that would not be treated by Excel as 20 individual print jobs of eight pages each, but as a single 160-page print job.
Theoretically you could specify, in the Print dialog box (Excel 2007 and Excel 2010) or the print settings page (Excel 2013), that you wanted to print pages 1, 2, 9, 10, 17, 18, etc., but this is prone to error and quite tedious. It gets even more difficult if the worksheets being printed consist of varying numbers of pages.
The best solution is to write a macro that will do the printing for you. The macro can step through however many worksheets you've selected and print only the first two pages of each of those worksheets. The following macro implements this technique:
Sub PrintTwoPages() Dim sht As Variant For Each sht In ActiveWindow.SelectedSheets sht.PrintOut From:=1, To:=2, Preview:=True Next Set sht = Nothing End Sub
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9579) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Printing Limited Pages from a Range of Worksheets.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
You already know that you can define names that apply to different ranges of cells and other elements such as formulas. ...
Discover MoreIf you want to print just the contents of a number of rows and columns, it can be challenging to get the output you want. ...
Discover MoreWhen you print a worksheet, you may want to specify that the printout be done on a particular paper tray in a particular ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2018-12-14 10:52:03
Brian Rowe
You can specify the pages you would like printed in an array in vba. Here's a slimed down version of code I use to print specific worksheets to pdf files. This examples prints odd numbered worksheets from 1 to 11.
ThisWorkbook.Sheets(Array(1, 3, 5, 7, 9, 11)).PrintOut
2018-12-13 08:21:52
Jennifer Thomas
I'm not usually a fan of setting print areas, as they tend to confuse less-educated users, but in this case it would be an easy solution (assuming you always want to print just the first two pages of each sheet).
2014-11-12 13:09:40
Carol
Andrew, If you hold Ctrl key while selecting worksheets you can pick non-adjacent worksheets. But you will have to print all pages of those worksheets not just specific pages of each worksheet as tip is talking about.
2014-09-27 05:46:11
Andrew
re "you could specify, in the Print dialog box (Excel 2007 and Excel 2010)... that you wanted to print pages 1, 2, 9, 10, 17, 18, etc."
I'm using Excel 2010 and I don't get the option to print selected pages other than a single, contiguous range. I'd very much like to pick sheets, say, "1-2,4,7" of a Workbook but I can't.
2014-09-27 05:31:27
Charles Peone
What happened to report manager? How does Excel handle multi-page, range report printing?
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2023 Sharon Parq Associates, Inc.
Comments