Hi all,
I am trying to find a way to identify which page a cell is on (after a print preview is performed) and then insert rows to the worksheet based on what values are found before and after the page break:
if values on page1 <> values on page2 then just add header:
1
1
1
1
----page break----
2
2
2
3
3
becomes:
1
1
1
1
----page break----
<insert row>
2
2
2
3
3
and if values page1 = values page2 then insert rows until they don't
1
1
1
1
2
2
-------page break-----
2
2
3
3
3
becomes
1
1
1
1
<insert row>
<insert row>
----page break----
<insert row>
2
2
2
2
3
3
3
The code I have so far is:
where the two lines with the #getPageNumber()# variable standin is where I don't know the command for getting the page number.
Is there an easy way to get this?
Bookmarks