search
HomeTopicsexcelHow to set and change print area in Excel

This tutorial shows you how to easily manage print areas in Excel, both manually and using macros. Printing an entire spreadsheet can be cumbersome; Excel's print area feature lets you specify exactly what prints.

  • Setting a Print Area
  • Defining Multiple Print Areas
  • Ignoring Print Areas
  • Printing Multiple Areas on One Page
  • Setting Print Areas Across Multiple Sheets (using VBA)
  • Modifying a Print Area
  • Clearing a Print Area
  • Protecting a Print Area (using VBA)
  • Troubleshooting Print Area Issues

Excel Print Areas Explained

A print area defines the cell range included in a printout. If you don't need the entire spreadsheet, define a print area encompassing only the necessary data. Selecting a print area ensures only that region prints when you use Ctrl P or the Print button. Multiple print areas on a single sheet each print on a separate page. Print areas are saved with the workbook.

Setting a Print Area

There are two ways to set a print area:

Quick Method:

  1. Select the data you want to print.
  2. Go to the Page Layout tab, Page Setup group, and click Print Area > Set Print Area.

How to set and change print area in Excel

A faint gray border indicates the print area.

How to set and change print area in Excel

Detailed Method:

  1. On the Page Layout tab, click the Page Setup dialog launcher How to set and change print area in Excel.
  2. In the Sheet tab, enter or select the desired range(s) in the Print area field (hold Ctrl for multiple ranges).
  3. Click OK.

How to set and change print area in Excel

Tips: Print areas are saved with the workbook. Always preview (Ctrl P) before printing to verify the selection. To print a selection without setting a print area, select the range, press Ctrl P, and choose Print Selection.

Multiple Print Areas

To print several sections of a worksheet:

  1. Select the first range, hold Ctrl, and select additional ranges.
  2. On the Page Layout tab, click Print Area > Set Print Area.

Each area prints on a separate page. This works only for non-contiguous ranges.

Ignoring Print Areas

To print the entire sheet or workbook, ignoring defined print areas:

  1. Click File > Print or press Ctrl P.
  2. Under Settings, select Ignore Print Area from the Print Active Sheets dropdown.

How to set and change print area in Excel

Printing Multiple Areas on One Page

This depends on your printer's capabilities. Check your printer properties for a Pages per Sheet option. If unavailable, copy the print ranges to a new sheet using Paste Special > Linked Picture to maintain links to the original data, then print the new sheet.

How to set and change print area in Excel

Setting Print Areas Across Multiple Sheets (VBA)

For consistent print areas across many similarly structured worksheets, VBA macros are efficient.

Macro 1: Match Active Sheet's Print Area: This macro sets the print area of selected sheets to match the active sheet.

Sub SetPrintAreaSelectedSheets()
  Dim CurrentPrintArea As String
  Dim Sheet As Worksheet
  CurrentPrintArea = ActiveSheet.PageSetup.PrintArea
  For Each Sheet In ActiveWindow.SelectedSheets
    Sheet.PageSetup.PrintArea = CurrentPrintArea
  Next
End Sub

Macro 2: Apply Print Area to All Sheets: This macro applies the active sheet's print area to all sheets in the workbook.

Sub SetPrintAreaAllSheets()
  Dim CurrentPrintArea As String
  Dim Sheet As Worksheet
  CurrentPrintArea = ActiveSheet.PageSetup.PrintArea
  For Each Sheet In ActiveWorkbook.Sheets
    If Sheet.Name  ActiveSheet.Name Then
      Sheet.PageSetup.PrintArea = CurrentPrintArea
    End If
  Next
End Sub

Macro 3: User-Defined Print Area: This macro prompts the user to select a print area, then applies it to all selected sheets.

Sub SetPrintAreaMultipleSheets()
  Dim SelectedPrintAreaRange As Range
  Dim SelectedPrintAreaRangeAddress As String
  Dim Sheet As Worksheet
  On Error Resume Next
  Set SelectedPrintAreaRange = Application.InputBox("Please select the print area range", "Set Print Area in Multiple Sheets", Type:=8)
  If Not SelectedPrintAreaRange Is Nothing Then
    SelectedPrintAreaRangeAddress = SelectedPrintAreaRange.Address(True, True, xlA1, False)
    For Each Sheet In ActiveWindow.SelectedSheets
      Sheet.PageSetup.PrintArea = SelectedPrintAreaRangeAddress
    Next
  End If
  Set SelectedPrintAreaRange = Nothing
End Sub

Download a sample workbook with these macros for easy use.

Modifying a Print Area

To expand a print area:

  1. Select cells to add.
  2. On the Page Layout tab, click Print Area > Add to Print Area.

How to set and change print area in Excel

Alternatively, use the Name Manager (Formulas tab > Defined Names > Name Manager) to edit the Print_Area range directly, or modify the range in the Page Setup dialog box.

Clearing a Print Area

On the Page Layout tab, click Print Area > Clear Print Area.

Protecting a Print Area (VBA)

There's no direct way to lock a print area. Use VBA's Workbook_BeforePrint event to enforce a specific print area before printing:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
  ActiveSheet.PageSetup.PrintArea = "A1:D10" ' Or specify the desired range
End Sub

(Adapt for multiple sheets with different ranges as needed.) Place this code in the ThisWorkbook module of your macro-enabled workbook (.xlsm).

Troubleshooting

  • Cannot set print area: Clear the print area and redefine it.
  • Not all columns printed: Column width may exceed paper size. Adjust margins or scaling (Fit All Columns on One Page).
  • Print area prints on multiple pages: Non-adjacent ranges print separately. If a single range spans multiple pages, reduce its size or adjust page settings (Fit Sheet on One Page).

This comprehensive guide enables efficient print area management in Excel, enhancing your worksheet printing experience.

The above is the detailed content of How to set and change print area in Excel. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools