You may need to remove page numbers in Excel, so they don’t appear on your printed Excel reports.
In this tutorial, I show you three ways to remove page numbers in Excel.
Method #1: Delete the Page Code From the Header or Footer
You can use the steps below to delete the page code from the header or footer of a worksheet:
- Open the View tab and click the Page Layout button on the Workbook Views group.
- Scroll down the page and click the box with the page number. Notice that the page number turns into a page code(s).
- Select the code and delete it.
Note: Delete the page code from the box in the header if the page numbers are in the header.
- Click on the worksheet.
The above steps remove the page numbers in Excel in the active worksheet. If you want to remove page numbers from multiple worksheets simultaneously, group the worksheets and then repeat the steps above.
Note: To group worksheets, click the first worksheet tab, press and hold down the Shift key, and click the last worksheet tab.
Method #2: Use the Page Setup Dialog Box
You can use the Page Setup dialog box to remove page numbers in Excel using the steps below:
- Open the Page Layout tab and click the dialog box launcher in the bottom right corner of the Page Setup group to launch the Page Setup dialog box.
- On the Page Setup dialog box, click the Header/Footer tab, open the Header or Footer drop-down menu (in this case, the Footer drop-down menu), scroll up the list, select the ‘(none)’ option, and click OK.
The above steps remove the page numbers in Excel in the active worksheet. To remove page numbers from multiple worksheets simultaneously, group the worksheets and then repeat the above steps.
You can group worksheets by clicking the first worksheet tab, pressing and holding down the Shift key, and clicking the last worksheet tab.
Also read: How to Remove Page Breaks in Excel?
Method #3: Use VBA
You can use the VBA code below to remove page numbers from all worksheets in the current workbook:
Sub RemovePageNumbers()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws.PageSetup
.CenterHeader = ""
.LeftHeader = ""
.RightHeader = ""
.CenterFooter = ""
.LeftFooter = ""
.RightFooter = ""
End With
Next ws
End Sub
Note: The above code handles all possible placements of page numbers in the footer or header. You can customize the code to fit your situation. For instance, if the page numbers are centered in the footer, you can use the code below:
Sub RemovePageNumbers()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.PageSetup.CenterFooter = ""
Next ws
End Sub
In this tutorial, I have shown you three ways to remove page numbers in Excel. I hope you found this Excel article helpful.
Other Excel articles you may also like: