How to put a portrait page number on a landscape page

This need frequently arises in typing academic papers such as theses or dissertations (or sometimes when creating business reports and proposals). Often a table or figure will fit on the page only if it’s turned sideways (broadside). But graduate school requirements may call for all pages to have a page number at the bottom or to have the same header and/or footer as the rest of the document. So the question arises: How do I get my tables printed in landscape orientation and still have a portrait page number?

Go here for step-by-step instructions: