1. On the View tab, in the Workbook Views group, click Page Layout, to switch to Page Layout view.

2. Click Add footer.

The Header & Footer Tools contextual tab activates.
3. On the Design tab, in the Header & Footer Elements group, click Page Number to add the page number.

4. Type " of "
5. On the Design tab, in the Header & Footer Elements group, click Number of Pages to add the number of pages.

Result:

Note: Excel uses codes in order to automatically update the header or footer as you change the workbook.
6. Click somewhere else on the sheet to see the footer.

7. On the Design tab, in the Options group, you can add a different first page header/footer and a different header/footer for odd and even pages.

8. On the View tab, in the Workbook Views group, click Normal, to switch back to Normal view.
.