logo
search
Printing Problems

How to Skip Specific Pages When Printing in Excel

Huma Ashraf ChHuma Ashraf Ch Sep 27, 2026 869 views

Question details

The user needs to print specific pages from a large Excel workbook while skipping others, utilizing a custom list and VBA macros.

How to Skip Specific Pages When Printing in Excel
Product
Excel
Device & OS
not provided
Scenario
Printing large workbooks with hundreds of pages where only specific, non-contiguous pages are required.
Observed behavior
The user wants to automate the process of printing selected pages individually while efficiently bypassing the unwanted pages.
Before you start

Before running any VBA macros, save a copy of your workbook as a backup and ensure that macros are enabled in your Excel Trust Center settings.

Solution 1Recommended

Use a VBA Macro to Print Selected Pages

Create a list of desired page numbers and use a VBA macro to loop through the list, printing only the pages you specify.

This method is ideal for large workbooks with hundreds of pages. By explicitly listing the page numbers you want to keep, the macro will automatically skip the ones you omit.

1
Create a Page List

In a new or existing worksheet, create a dedicated column and type the specific page numbers you want to print.

2
Open the VBA Editor

Press 'Alt + F11' on your keyboard to open the Visual Basic for Applications (VBA) editor.

3
Insert a New Module

Click 'Insert' from the top menu bar and select 'Module' to create a blank script window.

4
Paste the Print Macro

Write or paste a VBA script that loops through your created list and uses the PrintOut method for each specified page number.

5
Run the Macro

Close the VBA editor, return to your workbook, press 'Alt + F8', select your new print macro, and click 'Run'.

Use a VBA Macro to Print Selected Pages
Test with Dummy Data: Always test your VBA macro on a copy of your file containing dummy data before running it on your original document to prevent accidental printing errors.
Efficient Spreadsheet Printing

Easily Manage and Print Specific Pages with WPS Office

WPS Office provides intuitive page layout management, advanced print settings, and excellent macro support, allowing you to easily select, skip, and print specific pages in large spreadsheets.

  1. 1. Open File: Open your spreadsheet in WPS Office.
  2. 2. Access Page Layout: Navigate to the 'Page Layout' tab to manage your print areas.
  3. 3. Open Print Settings: Press 'Ctrl + P' to access the custom print range settings.
  4. 4. Use the Macro Editor: If using a custom script, press 'Alt + F11' to open the WPS Macro Editor and run your automated print job.
Seamless format compatibility with Microsoft Excel (.xlsx, .xlsm) files.Advanced print preview and custom page layout management features.Supports VBA macros for automating complex and repetitive printing tasks.Lightweight, fast, and free to use for basic daily tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Can I print non-contiguous pages in Excel without using a VBA macro?

Yes, you can manually print non-contiguous pages by opening the print dialog (Ctrl + P) and printing each continuous page range separately. However, this manual method can be time-consuming for very large documents.

Why is my VBA print macro not working?

Your macro may fail if macros are disabled in your Trust Center security settings, or if the page numbers referenced in your worksheet list exceed the actual number of pages currently in the workbook.

How do I save a workbook that contains a VBA print macro?

You must save your document as an Excel Macro-Enabled Workbook (.xlsm). Standard Excel workbooks (.xlsx) cannot store VBA code, and your macro will be lost if saved in that format.