PDA

View Full Version : how to get value of page, where exact cell is?



Darius
02-11-2021, 04:50 AM
Hi,
my task is to get page number of cell, for example, D48 in sheet3, for further programming. The case is that this cell can be moved up and down by deleting, inserting or hidding rows, but in really it indicates the table/datagroup which can not be splitted to two different pages. I dont need it for printing, maybe put that pagenumber value to this exact cell (D48) just for overview purpose. During the work with excel file, where this function will be, the rows will be changing a lot, so this pagenumber should be refreshing too, like random number formula, it recalculate everytime something changes in file.
And this is a part of a problem. The file use macro which changes header by cell value (or sheet name). There are much more macros, what do other tasks and runs simultaneously, so each macro should be working without damaging each other, as for other macros i had this issue, and it was very difficult to fix.

If there is any easy to know at which row one page ends and where other one starts, it would be very very helpfull, i'm not so strong at vba, just beginner :)
P.S. read already many forums and codes, nothing suitable.