Total column on multiple sheets

mbesspiata

Board Regular
Joined
Aug 28, 2009
Messages
100
I have vba to separate out invoice costs into separate sheets in excel. I need vba to add the total to those columns on each sheet. I other words, I need the macro to add the total to the column (I) and move to the next sheet and add the total to that column and move on to the next sheet.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
.
You'll need to add to your existing macro ... code that will locate and select the first blank cell in that column. This macro should be activated
AFTER the costs have been pasted to the invoice.

The next step will be to add a formula to the selected cell that totals everything in the column.

To find and select the first blank cell : http://www.excelhowto.com/macros/find-select-first-blank-cell-column-vba/

To insert a formula :

Code:
 ActiveCell.Value = "=Sum(I1:I20)"

NOTE: The example formula is only an example. You will need to adjust the range.



Another approach would be to place the TOTAL cell at the TOP of the Column I and include the formula there when creating
the INVOICE SHEET. It will be a part of the sheet already. Then you can skip all of the above. An example formula would
be

Code:
=SUM(I2:I20)

and this would be placed in I1
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

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