Home Topics excel How to set and change print area in Excel

How to set and change print area in Excel

Apr 03, 2025 am 10:24 AM

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
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

(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 of this Website
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

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to create timeline in Excel to filter pivot tables and charts How to create timeline in Excel to filter pivot tables and charts Mar 22, 2025 am 11:20 AM

This article will guide you through the process of creating a timeline for Excel pivot tables and charts and demonstrate how you can use it to interact with your data in a dynamic and engaging way. You've got your data organized in a pivo

how to sum a column in excel how to sum a column in excel Mar 14, 2025 pm 02:42 PM

The article discusses methods to sum columns in Excel using the SUM function, AutoSum feature, and how to sum specific cells.

how to make pie chart in excel how to make pie chart in excel Mar 14, 2025 pm 03:32 PM

The article details steps to create and customize pie charts in Excel, focusing on data preparation, chart insertion, and personalization options for enhanced visual analysis.

how to make a table in excel how to make a table in excel Mar 14, 2025 pm 02:53 PM

Article discusses creating, formatting, and customizing tables in Excel, and using functions like SUM, AVERAGE, and PivotTables for data analysis.

Excel formula to find top 3, 5, 10 values in column or row Excel formula to find top 3, 5, 10 values in column or row Apr 01, 2025 am 05:09 AM

This tutorial demonstrates how to efficiently locate the top N values within a dataset and retrieve associated data using Excel formulas. Whether you need the highest, lowest, or those meeting specific criteria, this guide provides solutions. Findi

how to calculate mean in excel how to calculate mean in excel Mar 14, 2025 pm 03:33 PM

Article discusses calculating mean in Excel using AVERAGE function. Main issue is how to efficiently use this function for different data sets.(158 characters)

how to add drop down in excel how to add drop down in excel Mar 14, 2025 pm 02:51 PM

Article discusses creating, editing, and removing drop-down lists in Excel using data validation. Main issue: how to manage drop-down lists effectively.

All you need to know to sort any data in Google Sheets All you need to know to sort any data in Google Sheets Mar 22, 2025 am 10:47 AM

Mastering Google Sheets Sorting: A Comprehensive Guide Sorting data in Google Sheets needn't be complex. This guide covers various techniques, from sorting entire sheets to specific ranges, by color, date, and multiple columns. Whether you're a novi

See all articles