How to reference page number in a function in Calc

Asked by Blue_Bullet

Is there a way to reference the page number as in View...Page Break Preview in a cell formula? I do not see a function that allows me to do that. View...Page Break Reference shows the page numbers that cells belong to, but I cannot find a way to get at the page number in a cell formula.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Solved by:
GercoKees
Solved:
Last query:
Last reply:
Revision history for this message
Best GercoKees (gercokees) said :
#1

i do not think that there is this feature, however, you might want to try this:

=int(row()/60)+1

this assumes you have approx 60 rows on one page, so row 240 would be on:
240/60+1=5th page.

Hope this helps...

Revision history for this message
Blue_Bullet (nrburness) said :
#2

Thanks GercoKees,

I used the same thing: =CELL("ROW";A4)-1 to get a cell count less the header row. I have to deduct 2,3,4,.. on subsequent pages to account for header rows. I had hoped there might be a variable indicating pagesize so that the calculation would not need to be maintained as the pagesize was changed via the mouse. It might be difficult to implement as pagesizes could vary within the sheet though each cell could know what page it belonged to. The calculation would need no maintenance at all if the pagenumber within the sheet were also known and the number of header rows was a fixed number. Seems like I always want something that is not available.
Thanks again for your suggestion.

Revision history for this message
Blue_Bullet (nrburness) said :
#3

Thanks GercoKees, that solved my question.