Assume that one of the pages in a report is set up in landscape layout, while all the other pages are in portrait layout.
When all the pages are combined into a single report, the page number that should be at the bottom of the landscape page will not be printed at the bottom, but at the right side (the footer of a page printed in landscape layout).
Print the page number from a cell in the sheet, not from the Header/Footer in Page Setup.
Example: The Income Statement (see the screenshot at the end of this tip) has many columns, and is printed in landscape layout while all other pages are printed in portrait mode.
To print the page number from a cell in the sheet:
1. Select column A (see the screenshot at the end of this tip).
2. Right-click, and select Insert from the shortcut menu.
3. In cell A3, type the number of the page in the report (in this example, 5).
4. Select the range A3:A26, and press Ctrl+1 to format the cells, and then select the Alignment tab.
5. In Text Alignment, select Left from the Horizontal dropdown list (in Excel 97, select Right), and Center from the Vertical dropdown list.
6. In Text Control, check Merge cells.
7. In Orientation, change the text orientation to -90 degrees (if the sheet direction is right to left, text orientation should be +90 degrees), and then click OK.
To update the print area:
1. From the File menu, select Page Setup.
2. Select the Sheet tab.
3. In Print Area, change B3 to A3. The new print area is now A3:J26 (that is, the print area includes the new column).
4. Select the Margins tab, and reduce the right margin to 0 (so that the page number will appear at the bottom of the printed page).
5. Select the Header/Footer tab, and then select Custom footer.
6. Delete Page (if it appears in one of the sections), and then click OK. The page number, 5., is displayed horizontally and centered in Column A. Screenshot // Printing a Page Number in Portrait While the Page Is in Landscape Layout