When printing longer worksheets, you may long for a way to print either odd or even pages. Unfortunately, Excel doesn't' include this capability. There are a couple of ways you can work around this problem, however.
First, if your purpose for printing odd and even pages is to print double-sided, you might check out your printer driver to see if it can handle double-sided printing or if it will somehow print just odd or even pages. This approach allows you to bypass Excel altogether.
Another way to bypass Excel is to simply create a PDF file from your output. You can then open the PDF file and use Acrobat or Adobe Reader to print either odd or even pages.
If you want to stay within Excel, then perhaps the best way to handle the situation is to come up with a macro that will handle the printing. Such a macro can be approached in any number of ways. Here's a short one:
Sub PrintOddEven() Dim TotalPages As Long Dim StartPage As Long Dim Page As Integer StartPage = InputBox("Enter starting page number") TotalPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)") If StartPage > 0 And StartPage <= TotalPages Then For Page = StartPage To TotalPages Step 2 ActiveSheet.PrintOut From:=Page, To:=Page, _ Copies:=1, Collate:=True Next End If End Sub
When you run the macro, you are asked for a starting page number. In most instances you would enter either 1 or 2, but you could actually enter any page number you want. The macro then prints the starting page and every second page from thereon out.
You could, if desired, also print odd and even pages by creating two custom views in Excel—one for odd pages and one for even pages. All you need to do is specify a non-contiguous range of cells (consisting of the cells in either the odd or even pages) as your print area for each view. For instance, if you wanted to define a print area that consisted of the cells for all the odd pages, you could do this:
With the print area selected, save the view. Then wipe out the print area, use the same technique to select all the even cells, and save the view. You now have two views you can print, and each view will contain only odd or even pages. The only drawback to this approach is that Excel numbers the printed pages sequentially (1, 2, 3, 4) instead of what they really are (1, 3, 5, 7).
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8843) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Printing Odd or Even Pages.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Need to print an entire workbook? It's as easy as adding a single line of code to your macros.
Discover MoreIf you need to modify where a worksheet is printed (meaning, which paper tray it should use), Excel doesn't provide a lot ...
Discover MoreIf you have a workbook containing many worksheets, you might want to print only those worksheets that have some sort of ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2016-10-15 09:27:07
balasubramanian
nice info thank u
2015-03-31 23:30:09
Shiva
super tip
2015-03-31 23:21:52
Shiva
how to open excel file in internet explorer using html code, can anyone help me, I only need html code!
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2022 Sharon Parq Associates, Inc.
Comments