Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Am 28.09.2015 um 11:48 schrieb Dave Howorth:
Can you guarantee that each page has the same amount of rows?

If necessary, yes. In fact it will probably happen without any work on
my part.

Cheers, Dave


This may be worth the effort for many pages:
http://www.mediafire.com/view/1045sqauccjloug/SubTotal_PrintRanges.ods


Data in B. Notice that the amount of cells is the same but not
necessarily the amount of values in B.
Columns A to E are set up as print ranges with row #1 as repeating row.
Helper columns F and G are outside the print range. The regular sequence
in F assumes a page break after some amount of rows as specified in J1.
Setup values are J1 and J2. J1 holds the general row count below the
first page. The first page may be different and J2 specifies the start
row (last row of page #1 actually).
The start values in C and E of the start row refer to the running total.
The subsequent rows have identical formulas.
The very last page total in C1001 needs manual correction.

Finally I added a set of user defined Basic functions and applied one of
them in column N. It detects if there is a horizontal page break, so
this formula does not depend on regular cell count on each page. It does
not refer to J1 nor J2.
Column O uses column N to calculate the same sequence as in the regular
sequence of column F. If you replace the formulas in F with the formulas
in O, the row count of the pages should not matter anymore.
One glitch: These user defined functions require Ctrl+Shift+F9 (enforced
recalculation) in order to recalculate and they need some seconds to
recalculate.


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.