Counting rows between page breaks, and using that value for a formula

f16driver

New Member
Joined
Oct 15, 2013
Messages
4
After scouring the web and this forum to no avail, I am reaching out for help. Long story short, I am creating a logbook for flying purposes, and am creating a Macro to copy all of the logbook data and format it for printing. I have already figured out most of what I need, but a problem presented itself yesterday when i opened the file on a separate computer. The print area changed on my laptop vs. my work computer, and while my code accounted for creation of new rows with respect to page breaks, the formulas did not.
I would like to have the VBA count the number of rows on only one printed page (between page breaks) and output that as an integer value, then utilize that value for formula generation. could someone give me a simple way to count only the number of cells on ONLY ONE page being printed (# of cells between page breaks). All rows are the same size and I only need to have to code count the number of rows on ONE page. Once I have that value, i am confident that I can put that VBA output into a formula. If you need specifics on the code I have, let me know, however I just need conceptually how to do the row count for a single page. Thanks for everyone's time!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Anyone any ideas? Still unable to find anything for counting just one page (between page breaks) worth of rows.
 
Upvote 0

Forum statistics

Threads
1,216,117
Messages
6,128,937
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top