Sub topic 3
Choosing what prints with a print area
This chapter assumes you can use the ribbon, select ranges, and tell a worksheet from a workbook. You should also know that Excel splits a sheet into pages based on paper size, margins, and scaling, which earlier chapters covered. Here you will control which cells take part in that split.
What a print area does
A print area is a range that you tell Excel to print instead of the whole used part of the sheet. Without one, Excel prints every cell that holds data or formatting. With one, Excel ignores everything outside the range. The same print area also applies when you export the sheet to PDF.
The print area is stored with the sheet as a defined name called Print_Area. This explains several behaviors later in the chapter.
Set a print area
- Select the range you want to print, for example
A1:H60. - Open the Page Layout tab.
- Choose Print Area, then Set Print Area.
Excel shows a faint border around the range in Normal view. In Page Break Preview, the area outside the range turns gray.
To clear it, choose Page Layout > Print Area > Clear Print Area. The sheet then goes back to printing all used cells.
Add more cells to an existing area
If you select a new range and choose Set Print Area again, you replace the old area. To add to it, select the extra range and choose Page Layout > Print Area > Add to Print Area. In current Excel versions the command appears only when a print area already exists.
If the added range does not touch the first one, Excel treats it as a second area. Each area prints on its own page, even if both would fit on one. This is the most common surprise with multiple areas. If you want the ranges together on one page, place them next to each other on the sheet, or hide the rows or columns between them.
Select cells at print time
You can also print a selection without defining a print area. Select the range, choose File > Print, then change the first setting under Settings to Print Selection. Excel uses the selection for this print job only and does not save it.
| Method | Saved with the file | Best for |
|---|---|---|
| Set Print Area | Yes | A report that is printed or exported repeatedly |
| Print Selection | No | A one-off print |
| No print area | Not applicable | Sheets where all used cells should print |
How the print area interacts with other settings
The print area feeds into the later steps of pagination. Scaling and page breaks work on the print area, not on the whole sheet. For example, Fit to 1 page wide shrinks the print area to the paper width. If your print area is much wider than the data you care about, the text will be smaller than you expect.
Print titles, covered in a later chapter, repeat rows or columns that may sit outside the print area. They are printed on each page in addition to the area.
Common problems
- A blank last page. Formatting, spaces, or a stray value outside the data can enlarge the used range. Set a print area that covers only the real content.
- The print area did not change after you inserted rows. Rows inserted inside the area expand it. Rows added just below the last row do not. Reset the area, or include a few spare rows when you set it.
- The old area still prints. Another sheet may be active. Print areas belong to individual sheets, so check the sheet you are printing.
- Several sheets are selected. If you group sheets, Set Print Area applies to all of them. Click a single sheet tab first to ungroup.
Set it from VBA
The same setting is available in code through the PageSetup.PrintArea property. It takes a string in absolute reference form.
Sub SetPrintArea()
ActiveSheet.PageSetup.PrintArea = "$A$1:$H$60"
End Sub
Sub ClearPrintArea()
ActiveSheet.PageSetup.PrintArea = ""
End SubAssigning an empty string removes the print area, which matches the Clear Print Area command.
Exercise
A sheet has a report in A1:F40 and a notes block in H1:J10. You choose Add to Print Area for the notes block. What happens when you print, and how can you get everything on one page?
Show answer
Excel treats the two ranges as separate areas and prints each on its own page, because they are not adjacent. To get one page, make the ranges adjacent (for example, move the notes next to the report) or hide the columns between them, then set a single print area that covers both.
Exercise
You set the print area to A1:H60 and later use Fit to 1 page wide. The text looks small even though the data fills only columns A to E. What is the likely cause, and what is the fix?
Show answer
The print area includes columns F to H, which are mostly empty, so Excel scales the full width of A:H to fit one page. Set the print area to A1:E60, or whichever columns hold the data, and the text will scale larger.