This is a discussion on Show Page Number via formula within the Excel Questions forums, part of the Question Forums category; Is it possible to include the page number in a formula? e.g. ="Mytext "&(page.number.here) I don't want to use a ...
Is it possible to include the page number in a formula?
I don't want to use a macro, just the standard formula bar.
James Walker, Jr.
While I don't know of any such "page" formula, it certainly is possile to show a page number. Highlight your spreadsheet, then click on File, Print Area, Set Print Area. For a simple spreadsheet, with no frozen panes, you should have about 51 or so lines for your first page. In my example, I got 51 rows for the first page. For this case, the formula to use is:
=INT(rowNumber/51 + 0.02)
For different values of the number of rows for the first page, you will have to change the second term ofthe formula, 0.02, until you confirm that the row number at the end of a page does, indeed, correspond to that page, and not the next one. For this purpose, it is easiest to go to the lst row in the last whole page, and use =rowNumber/51 (51, or 52, or whatever number of rows your first page has) to deduce the actual value of this term. One may, also, use a Tools/Goal Seek approach. In the present case, this method gave 0.019607844 as the necessary value, but I used the 0.02 value successfully, at least up to page 10.