Excel course · Lesson 29 of 34

Printing and page setup

Print exactly what you need: print areas, fit to page, orientation, repeating header rows, headers and footers, page breaks and exporting to PDF.

Advanced 14 min read

Spreadsheets are built for screens, so printing them can produce surprises: a table spread across nine pages, a column on its own sheet of paper, page 4 with no headings. With a few page setup choices you can control exactly what prints and how it looks. The same settings decide how a sheet looks when you save it as PDF, which is how most 'printing' happens today.

Start with Print Preview

Press Ctrl+P (Mac: Cmd+P) or choose File › Print. The right side shows a preview, the left side the most important settings. Use the arrows at the bottom to step through pages; the page count tells you immediately whether something is wrong. Click Show Margins (the small icon at the bottom right) to drag margins and column widths directly in the preview.

Choosing what to print

  • Print Active Sheets (default), Print Entire Workbook, or Print Selection.
  • Set a print area to print only part of a sheet every time: select the range and choose Page Layout › Page Setup › Print Area › Set Print Area. Add to Print Area adds a second range, which prints on its own page. Clear Print Area removes it.
  • Print several sheets at once by selecting their tabs with Ctrl+click before printing. Remember to click a single tab afterwards; while several sheets are grouped, typing changes all of them.

Fit the page

  1. Choose Page Layout › Page Setup › Orientation › Landscape for wide tables.
  2. In Page Layout › Scale to Fit, set Width to 1 page and Height to Automatic. All columns fit on one page width and the rows flow onto as many pages as needed.
  3. Check the Scale percentage that results. Below about 60% the text becomes hard to read; consider hiding unneeded columns or using a smaller paper margin instead.
  4. In the Print screen, the same choice is available as Fit All Columns on One Page.
Watch out. Fit Sheet on One Page shrinks long lists to an unreadable size. Use it for dashboards and summaries, not for a 500-row list.

Repeat headings on every page

A list that runs over several pages needs its header row on each page.

  1. Choose Page Layout › Page Setup › Print Titles.
  2. Click in Rows to repeat at top and select row 1 on the sheet (it appears as $1:$1). For a heading block use $1:$3.
  3. For very wide sheets, also set Columns to repeat at left, for example $A:$A for the names.
  4. Click Print Preview to check page 2.
Tip. Freeze Panes only affects the screen. Print Titles is the printing equivalent. You need both for a long list.

Headers and footers

  1. Choose Insert › Text › Header & Footer, or Page Layout › Page Setup dialog launcher › Header/Footer tab.
  2. Excel switches to Page Layout view. Click in the left, centre or right section of the header or footer.
  3. Use the Header & Footer tab buttons to insert codes: Page Number, Number of Pages, Current Date, File Name, Sheet Name.
  4. A typical footer: left &[File], centre Page &[Page] of &[Pages], right &[Date].
  5. Click any cell in the sheet to leave the header, then View › Normal to return to the normal view.

Options in the Header/Footer dialog include Different first page (for a cover page), Different odd and even pages, and Scale with document.

Page breaks

View › Workbook Views › Page Break Preview shows the sheet with blue lines where pages end and grey page numbers. Dashed lines are automatic breaks; solid lines are manual. Drag a line to move a break. To force a break before a section, select the first row of the section and choose Page Layout › Breaks › Insert Page Break. Reset All Page Breaks removes manual breaks.

Margins, centring and gridlines

  • Page Layout › Margins: Normal, Wide, Narrow or Custom Margins, where you can also tick Center on page: Horizontally, which makes a narrow table look intentional.
  • Page Layout › Sheet Options › Gridlines › Print: prints the light grid. Usually it is better to add proper borders to the table.
  • Headings › Print: prints row numbers and column letters, useful when you discuss a printed sheet with someone ('look at cell F12').
  • Page Setup dialog › Sheet › Print: options for printing comments at the end, showing errors as blank or --, and black and white.

Saving as PDF

  1. Choose File › Export › Create PDF/XPS (Windows) or File › Save As and choose PDF.
  2. Click Options to choose Active sheet(s), Entire workbook, Selection or a page range.
  3. Click Publish. All page setup settings, print areas and titles apply to the PDF exactly as to paper.
  4. On Mac, choose File › Save As › File Format: PDF, or print and choose PDF › Save as PDF.

Page Layout view

View › Workbook Views › Page Layout shows the sheet as pages with rulers, margins, headers and footers. You can edit data normally in this view, which is handy while building a report meant for printing. Note that Freeze Panes does not work in Page Layout view.

A checklist for a perfect printout

ProblemFix
Too many pagesSet a print area; Fit All Columns on One Page; landscape
One column on its own pageNarrow columns or margins; Scale to Fit width 1 page
No headings on page 2Page Layout › Print Titles › Rows to repeat at top
Section split across pagesInsert a manual page break above it
Text cut off in cellsWrap Text and AutoFit row height
##### on paperWiden the column; check in Print Preview
Error values printedPage Setup › Sheet › Cell errors as: blank
Note. Page setup is stored per sheet. If you need the same settings on many sheets, select all their tabs first, then change the settings once. Excel for the web has fewer print options (no Print Titles editing in some versions); open the file in the desktop app for full control.

Check yourself

1. How do you print the header row on every page?

2. Which setting keeps all columns on one page width but lets rows continue onto more pages?

3. Where can you see and drag page breaks?

4. Which header/footer code shows 'Page 2 of 5'?

5. Do print areas and print titles apply when saving to PDF?