+ Reply to Thread
Results 1 to 11 of 11

Pagewise Subtotal of Two Columns before each Page Break

  1. #1
    Registered User
    Join Date
    09-29-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Pagewise Subtotal of Two Columns before each Page Break

    Sir

    I need subtotal of C and D column before each page break (that page subtotal only) and if possible page number in next cell (Column E) (marked as green in screenshot).


    I tried filling series in Helper Column and Subtotal C & D at Each Change of that Helper Column. But in that way. Every nth Row pushed down. So blank pages between some pages messes up.

    Please Help...

    Attached Files Attached Files
    Last edited by 10AVATAR; 07-28-2019 at 01:04 PM.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Pagewise Subtotal of Two Columns before each Page Break

    What you ask is not possible, there is no formula / function that can identify the position of a page break.

  3. #3
    Registered User
    Join Date
    09-29-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Pagewise Subtotal of Two Columns before each Page Break

    I mean I want subtotal for every 25 rows and then page break. No need to identify page break

  4. #4
    Registered User
    Join Date
    09-29-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Pagewise Subtotal of Two Columns before each Page Break

    https://www.excelforum.com/excel-pro...each-page.html

    A macro like above thread and instead of progressive total I need only page subtotal Sir

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Pagewise Subtotal of Two Columns before each Page Break

    So where do you want the results?

    The odd numbered pages don't have an empty row at the end to be used for the results!

  6. #6
    Registered User
    Join Date
    09-29-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Pagewise Subtotal of Two Columns before each Page Break

    Sir , I want current page setup not disturbed that is 24/25 rows (or say 12 rows which have datas and 12 empty rows in between) per page excluding page titles (4 rows).... And want subtotal at every 25th or 26th rows.

  7. #7
    Registered User
    Join Date
    09-29-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Pagewise Subtotal of Two Columns before each Page Break

    In Helper Column N

    I put

    =INT((ROW(A25)-1)/24)+1

    in N5

    and fill till the end. I subtotal at each change in N... But look at the page number 178 and 179 and also others in attached XL File... the datas pushed down from page top to middle or somewhere. It shouldn't happen.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Pagewise Subtotal of Two Columns before each Page Break

    Your INT formula is wrong, try this one in N5

    =INT((ROWS(N$5:N5)-1)/25)+2

    See if that fixes the problem.

  9. #9
    Registered User
    Join Date
    09-29-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Pagewise Subtotal of Two Columns before each Page Break

    No Sir... This also not fixes the problem

    https://i.imgur.com/lsqdFVv.jpg


    See page 171 contents comes down from first line in this screen shot

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Pagewise Subtotal of Two Columns before each Page Break

    Your screen capture has 26 rows per page, the formula is based on the 25 rows per page in your original file.

    If you change the file from 25 rows per page to 26, then you need to change the formula from 25 to 26 as well.

  11. #11
    Registered User
    Join Date
    09-29-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Pagewise Subtotal of Two Columns before each Page Break

    I think it is impossible to stop the datas from flowing down from first line in some categories...

    But found a workaround...

    I modified the formula you suggested to

    =INT((ROWS(N$5:N5)-1)/26)+1

    and restarting this formula in each category after the last line of previous blank pages.... Seems fine

    Thanks for the Help
    Last edited by 10AVATAR; 07-28-2019 at 09:53 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Move Page Break 1 cell up if bullet-point is in on the page break.
    By saudi_red_neck in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2019, 10:24 AM
  2. [SOLVED] How to insert pagewise (subtotal) total for columns
    By jilaba in forum Excel General
    Replies: 3
    Last Post: 05-09-2018, 11:30 AM
  3. Find First match value and add page break, findnext value and add page break
    By dwx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2013, 12:58 PM
  4. Macro for page break in columns not working
    By dlorenzo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2012, 01:06 PM
  5. need page break by asking the input file for page break to be done
    By saikumar in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-10-2008, 07:33 AM
  6. [SOLVED] Subtotal page break error?
    By Dips in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-09-2006, 06:25 PM
  7. adding a new page break to an existing page break
    By Edward Letendre in forum Excel General
    Replies: 1
    Last Post: 03-06-2005, 06:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1