How to Remove Page Numbers in Excel

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:

  1. Open the View tab and click the Page Layout button on the Workbook Views group.
click the Page Layout button
  1. Scroll down the page and click the box with the page number. Notice that the page number turns into a page code(s). 
click the box with the page number
  1. 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.

  1. 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:

  1. 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.
click the dialog box launcher
  1. 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.
click the Header/Footer tab

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:

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.

Leave a Comment