macro sub-total and autosum for variable length columns

RGH

Board Regular
Joined
Dec 17, 2003
Messages
71
Two issues both involving the same data set on different tabs. The data is being sorted, etc differently for each tab for different departments at work.

1. One tab has a variable amount of row data (300-5000+ rows), same number of columns, and needs an auto sum for one column at the bottom. I need to put the auto sum after the last row, not row 10,000. Help?

2. The other tab I need to put subtotals on. Same issues with variable amounts of data. The subtotal can't have a bunch of empty rows before the last groupings total and the grand total tab. Again, help.

Rob
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Have you tried?
last = ActiveCell.SpecialCells(xlLastCell).Row
to get equivalent of end+ home
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,591
Members
449,089
Latest member
Motoracer88

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