Adding page numbers in Microsoft Excel is essential when printing spreadsheets, especially for large documents. Unlike Word, Excel does not display page numbers on the main worksheet, but you can insert them in the header, footer, or specific print settings. Here is how to insert page number in excel.
- Using the Header & Footer Tool
One of the easiest ways to insert page numbers in Excel is through the header or footer. This method ensures page numbers appear on every printed page.
- Open your Excel workbook and go to the Insert tab.
- Click on Text, then select Header & Footer from the dropdown menu.
- Your worksheet will switch to Page Layout View, displaying header and footer areas.
- Click inside the header or footer where you want the page number to appear.
- In the Header & Footer Elements section, click Page Number. Excel will insert &[Page], a placeholder that automatically generates the page number when printed.
- If desired, you can add more details, such as Page &[Page] of &[Pages], to show both the current page number and total pages.
- Click anywhere outside the header/footer to finalize the changes.
To exit Page Layout View, go to the View tab and select Normal View.
- Using Page Setup for Custom Page Numbers
If you need more control over the placement of page numbers, use the Page Setup feature.
- Click on the Page Layout tab.
- In the Page Setup group, click on the small arrow in the corner to open the Page Setup window.
- Go to the Header/Footer tab.
- Click Custom Header or Custom Footer, depending on where you want the page number.
- In the left, center, or right section, click Insert Page Number (represented by &[Page]).
- Click OK and then Print Preview to see how the page numbers will appear when printed.
- Adding Page Numbers Through Print Preview
If you only need page numbers for printed documents, Excel’s Print Preview allows you to set them up easily.
- Press Ctrl + P or go to File > Print to open Print Preview.
- Click Page Setup at the bottom of the print settings.
- Navigate to the Header/Footer tab and select a predefined footer with page numbers, such as “Page 1 of ?” or just “Page 1”.
- Click OK, and the page numbers will appear when you print the document.
- Using Excel VBA for Advanced Page Numbering
For users who frequently work with large datasets and require custom numbering, a simple VBA script can automate the process.
- Press Alt + F11 to open the VBA editor.
- Click Insert > Module and enter the following code:
vba
CopyEdit
Sub InsertPageNumbers()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.PageSetup.CenterFooter = “Page &P of &N”
Next ws
End Sub
- Press F5 to run the script.
- The page numbers will appear in the center footer of each printed page.
This VBA method is useful for applying page numbers across multiple worksheets at once.
- Adjusting Page Numbers for Different Printing Needs
By default, Excel starts numbering pages from 1, but you can change this:
- Go to the Page Layout tab.
- Click Page Setup, then navigate to the Page tab.
- Under First Page Number, change “Auto” to a custom number (e.g., “5” if you want numbering to start from page 5).
- Click OK to apply the changes.
This is useful when combining different documents and needing continuous numbering across files.
Also Read: How To Improve Vision Without Glasses
Email your news TIPS to Editor@kahawatungu.com or WhatsApp +254707482874