Solved

Excel 2010 need to add subtotals to the end of each page

Posted on 2014-07-21
9
1,290 Views
Last Modified: 2014-08-26
I am using Excel 2010. I have a worksheet that will grow over time.  It currently has 3 pages.  I need a subtotal to appear at bottom of each page, preferably not in the footer, but at the bottom of the text on each page.  Columns that need totals are L, M & O.  It could be that we will adjust row height and the number of rows per page may change at some point in time.
I have attached the worksheet.

Thanks for your help.
Bad-Debt-Log-Master-X-.xls
0
Comment
Question by:klitton7
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 14

Expert Comment

by:Don Thomson
ID: 40210055
I'm sure that there is some fancy way to accomplish that with a macro - However - The problem becomes when you add a new item (row)  it will wipe out the total.  If you know about how large the sheet will grow to, Put the total at the top of the column.   So the total(s) cell will be =sum(L7:L10000)    =sum(M7:M10000)   and =sum(N7:N10000)
It will ignore the blanks when adding everything up

If you MUST have them at the bottom of the page - you would have to insert a row  somewhere in the range that is being totaled
0
 
LVL 13

Expert Comment

by:duncanb7
ID: 40210116
Try this put the sum(L6:L60000) on the around  the top of the page so
that you can add many number rows under row6 without affecting  the sum value
Please see attached
Duncan
Bad-Debt-Log-Master-X-2.xls
0
 

Author Comment

by:klitton7
ID: 40210170
Thanks for your response Duncan, but I need each page to have a total for that page, and then a grand total on the last page.  Sorry, I'm sure I didn't make that clear.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 13

Expert Comment

by:duncanb7
ID: 40210189
I just see one page in your workbook



Duncan
0
 
LVL 13

Expert Comment

by:duncanb7
ID: 40210209
Just reminder, did you know you can record what you edit or action you did or you want on Excel cell across different workbook and sheet into macro by Excel function of "Macro Recording" that will save  your expectation vba code into macro on VBA editor. Take a look at this Macro Recording tutorial at this site
https://www.youtube.com/watch?v=nvWpFdo7EO0

Duncan
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40210902
I looked at modifying the existing macros in your workbook, but none of them appeared to run properly, so I just created two new ones.  I added buttons to the sheet that will let you add or remove the subtotal lines at your discretion.

These macros will insert a subtotal line to the bottom of each sheet (every 26 rows of data) and add a final grand total line at the end.

A possible issue would occur if your final page had exactly 26 rows, in which case the grand total line would fall on its own page.  Otherwise, it should run with as many rows as you have in your worksheet.  With each iteration, you'd want to remove existing subtotals first, then add them back again.

Regards,
-Glenn
EE-Bad-Debt-Log-Master-X.xls
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40247599
Hi,

If you have any questions or issues with any of the solutions above, please let us know.

Otherwise, can you please properly close this question by clicking the "Accept this solution" link above the appropriate submission above that answers your question?.  This will help ensure that future searches are meaningful to other EE members.

If you still have issues or questions, please let us know.

Thanks,
-Glenn
0
 

Author Closing Comment

by:klitton7
ID: 40286175
Works great!  Thanks Glenn
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40286180
You're welcome.   Thank you for following up on this.

Regards,
-Glenn
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now