Sub topic 3
Choosing what prints with a print area
This chapter assumes you can move around the ribbon, select ranges, and format cells. It also assumes you know how Excel splits a worksheet into pages, which the first chapter covered. Here you will control which cells Excel sends to the printer or to a PDF.
What a print area is
A print area is a range, or a set of ranges, that Excel prints instead of the whole used range of the sheet. Without one, Excel prints every cell that holds data or formatting. With one, everything outside it is ignored, even if it contains data.
A print area belongs to a single worksheet. Each sheet in a workbook keeps its own. Excel stores it as a defined name called Print_Area, scoped to that sheet. This detail explains several behaviors later in the chapter.
Use a print area when the sheet holds things the reader should not see on paper:
- Scratch calculations or helper columns beside a report.
- Notes to yourself at the bottom or right of the data.
- Input cells, lookup tables, or chart source data.
- A dashboard region inside a larger working sheet.
Setting a print area
From the ribbon
- Select the cells you want to print.
- Go to Page Layout, then Print Area in the Page Setup group.
- Choose Set Print Area.
Excel shows a dashed line around the area in Normal view. In Page Break Preview, the area appears white and everything outside it is gray.
From the Page Setup dialog
- Open the Page Layout tab and select the small arrow at the bottom right of the Page Setup group.
- Go to the Sheet tab.
- Click in Print area and type a reference such as
$A$1:$H$60, or drag across the cells.
This route is useful when you want to type an exact range or edit an existing one without reselecting cells.
From Page Break Preview
In Page Break Preview, you can drag the blue border of the print area to enlarge or shrink it. This is fast for small adjustments, but it is easy to drag a border by accident. Check the result in Print Preview.
Several ranges in one print area
You can select more than one range and set them as the print area. Hold Ctrl while selecting, then choose Set Print Area.
Excel prints each range on its own page. It does not place them together on one page, even when both would fit. If you need two blocks on one page, they must be in one contiguous range. Options include moving the blocks next to each other, hiding the rows or columns between them, or building a separate summary sheet.
Two details matter here:
- Each range starts a new page, so the page count can be higher than you expect.
- Page numbering and scaling still apply across the whole set. Fit to 1 page wide applies to the widest range.
Adding to an existing print area
To extend a print area, select the extra cells, then choose Page Layout, Print Area, Add to Print Area. That command appears only when a print area already exists.
Be careful: the added range becomes a separate area, and it prints on its own page. Adding the cells directly below the current area does not enlarge it into one block. If you want one larger block, set the whole range again with Set Print Area, or edit the reference in the Page Setup dialog.
Clearing a print area
To go back to printing the whole sheet, choose Page Layout, Print Area, Clear Print Area. This removes the Print_Area name for the active sheet only.
If you have several sheets selected as a group, the command can clear the print area on all of them. Check the sheet tabs before you run it.
Printing a selection without saving a print area
Sometimes you want a one-time print of a few cells. Select them, then go to File, Print. Under Settings, change the first dropdown from Print Active Sheets to Print Selection.
This does not create a Print_Area name. The next time you print, the setting reverts to the sheet or its print area. Use this for quick jobs and use a print area for a layout you will print again.
If a sheet has a print area and you choose Print Selection, the selection wins for that job. Excel prints only the selected cells, not the intersection with the print area.
The same dropdown offers Print Entire Workbook. Excel then uses each sheet's own print area, and prints the used range of any sheet that has none.
How the print area interacts with other settings
The print area decides which cells are candidates for printing. Other settings then decide how those cells are laid out on pages.
| Setting | Effect with a print area |
|---|---|
| Scaling (Fit to pages) | Applies to the print area, not the whole sheet. A smaller area can print at a larger size. |
| Page breaks | Automatic breaks are computed inside the area. Manual breaks outside the area are ignored. |
| Print titles | Repeat rows or columns can lie outside the print area and still print on each page. |
| Headers and footers | Not affected. They print on every page. |
| Gridlines and headings | Apply only to cells inside the area. |
| PDF export | Respects the print area unless you tell it to ignore it. |
The print titles row is worth noting. If your header row is at row 1 but the print area starts at row 5, setting $1:$1 as the title row still prints row 1 at the top of each page. This is a common way to keep a header out of the main area while still showing it.
Print areas and the Excel Table or chart
Some objects need care:
- Charts and shapes. An object prints only if it sits at least partly inside the print area. A chart that crosses the border is cut at the edge. Move or resize it so it is entirely inside.
- Comments and notes. These print according to the sheet option you choose, covered in a later chapter. Their location does not extend the print area.
- Hidden rows and columns. Hidden cells inside the area do not print. This is a handy way to remove helper columns without leaving the print area.
A worked example
Suppose a sales sheet holds a report in A1:H60, with working formulas in K1:M60 and a note in A65. You want only the report to print.
- Select
A1:H60. - Choose Page Layout, Print Area, Set Print Area.
- Open File, Print and check the preview.
The preview should show the report only. If a second page appears with cells from the working columns, the print area was not saved on this sheet, or a different sheet is active.
The same setup in VBA looks like this:
Sub SetSalesPrintArea()
ActiveSheet.PageSetup.PrintArea = "$A$1:$H$60"
End SubTo clear it, assign an empty string:
Sub ClearSalesPrintArea()
ActiveSheet.PageSetup.PrintArea = ""
End SubThe assignment accepts a string reference. Two ranges are separated by a comma, as in "$A$1:$H$20,$A$30:$H$50", and they print on separate pages.
Keeping the print area correct as data grows
A fixed print area does not grow when you add rows. If your report gets longer each month, the new rows will be silently missing from the printout. There are two common approaches.
- Reset it each time. Reselect the data and set the print area again. This is simple but easy to forget.
- Use a dynamic definition. Open Formulas, Name Manager, find
Print_Areafor the sheet, and replace its reference with a formula such as=OFFSET($A$1,0,0,COUNTA($A:$A),8).
The dynamic approach has a catch. Excel may convert the formula back to a fixed range when you open the Page Setup dialog and click OK, or when you change other page setup options. Test it after any layout change. For a report that must be reliable, a short macro that sets the area from the current data is safer:
Sub SetPrintAreaToData()
Dim lastRow As Long
With ActiveSheet
lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.PageSetup.PrintArea = .Range("A1:H" & lastRow).Address
End With
End SubThis finds the last used row in column A and sets the area to columns A to H down to that row.
Common errors
- The print area is on the wrong sheet. Each sheet has its own. Check the active tab before setting it.
- Part of the data is missing. The area was set before the data grew. Check the dashed border or Page Break Preview.
- Extra pages with partial content. You used Add to Print Area, which makes a separate page. Reset the whole range instead.
- A chart is clipped. The chart extends beyond the area. Resize it to fit inside.
- A cleared area still seems to apply. You may be printing a selection, or another sheet in a group is active. Ungroup the sheets and check again.
- Rows or columns you hid still count. They do not print, but they still occupy positions in the area reference. This is expected.
Checking your work
Always confirm with a preview before printing or exporting. Page Break Preview shows the area directly, with gray outside and white inside. Print Preview shows the final pages and the page count at the bottom. If the page count is not what you expect, look at the area first. Scaling and breaks only have meaning once the area is right.
Exercise
A sheet has a report in A1:G40 and helper formulas in J1:J40. You select A1:G40 and set it as the print area. Next month the report grows to row 55. You select A41:G55 and choose Add to Print Area. What does Excel print, and how would you fix the layout?
Show answer
Excel prints two pages' worth of separate areas: A1:G40 on one page, and A41:G55 on its own page, because Add to Print Area creates a second range and each range starts a new page. To get one continuous report, select A1:G55 and choose Set Print Area again, or edit the Print area box in Page Setup to $A$1:$G$55.
Exercise
You set a print area of B5:F30 on Sheet1. Row 1 holds column titles and you set $1:$1 as the print title row. Does row 1 print, and where?
Show answer
Yes. Print titles are independent of the print area, so row 1 prints at the top of every page even though it lies outside B5:F30.