Go to the View tab and click Page Layout on the left of the Ribbon Menu.
Click one of the 3 sections of the header or scroll down and click one of the 3 sections of the footer. (Each section is for spatial reference and allows you to put data on the left, right, or in the middle of the header/footer.)
On the Design tab that should have appeared, click Page Number.
Once you click away from the header/footer, you will see the result:
You can add more text around the numbers; look to the next sections for more information.
Go to the View tab and click Page Layout and click a section in the header or footer and then, on the Design tab, click the Header option on the left and choose the 3rd option from the top.
It will automatically put the result into the middle section for you.
Move the Text out of the MiddleTo move it out of the middle, just click in the middle, select the data that appears, cut it, and paste it onto one of the sides.
A sort of mini-language is used for printing and this allows us to add normal text around it.
Go to the header and type This is page and a space and then click the Page Number button, another space, and then type of and another space, and finally, click the Number of Pages button. It will look like this:
This is page &[Page] of &[Pages]
You can put basically any text you want. The special elements start with an ampersand & and have square brackets around them.
By going to the Design tab for the header/footer, you can see options for the data that you can input in the Header & Footer Elements section. Also, by clicking the Header or Footer buttons on the left of the ribbon menu, you will see many pre-made options that can be useful and save a bit of time.
Make sure to download the sample file for this tutorial to work with these examples in Excel.