Automatic Summation beside the Sub-total in every page

nhinx

Board Regular
Joined
Aug 25, 2016
Messages
55
Office Version
  1. 2010
Hello Excel Expert,

I have a list of salespersons in the worksheet and I want to automatically sum up the amount in that particular column beside the Sub-total. To make things clear, here is my example. Say I have a list of names from A3 to A10 with a sales amount along with their name in C3 to C10 then I have a word "Sub-Total" in B11 and I want an automatic summation from C3 to C10 that fills in C11 beside the word "Sub-Total" and on the same sheet it continued to the next page. Say I have a list of names again in A12 to A20 with sales amount along their names in C12 to C20 and Sub-Total again in B21 and it automatically sum up again from C12 to C20 in cell C21 which are repetitive up to a certain page. Can you help me make a VBA code for this in order not to make manual summation.

Thank you,
Nhinx
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hello Excel Expert,

I have a list of salespersons in the worksheet and I want to automatically sum up the amount in that particular column beside the Sub-total. To make things clear, here is my example. Say I have a list of names from A3 to A10 with a sales amount along with their name in C3 to C10 then I have a word "Sub-Total" in B11 and I want an automatic summation from C3 to C10 that fills in C11 beside the word "Sub-Total" and on the same sheet it continued to the next page. Say I have a list of names again in A12 to A20 with sales amount along their names in C12 to C20 and Sub-Total again in B21 and it automatically sum up again from C12 to C20 in cell C21 which are repetitive up to a certain page. Can you help me make a VBA code for this in order not to make manual summation.

Thank you,
Nhinx

Hi Nhinx!

I came to a solution which is not perfect in my opinion but it works. Here is a spreadsheet with the aforementioned solution:
nhinx - Google Sheets

I hope this helps.

Have a nice day,
chleb
 
Upvote 0
Hi Chleb,

Thanks for the help. However, to make it easier I need to have an automatic summation in every page. Say I have a spreadsheet with 30 pages which saves me time doing those manual summation. I got code from google but its only applicable for only one pager document and it only sum the row with continues data and it doesn't sum to the bottom if there are data with blank rows.

Kind regards,

Nhinx
 
Upvote 0


The image above is output I need
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,335
Members
452,636
Latest member
laura12345

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