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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

big_mac

Board Regular
Joined
Jul 21, 2006
Messages
167
Have you tried?
last = ActiveCell.SpecialCells(xlLastCell).Row
to get equivalent of end+ home
 

Forum statistics

Threads
1,172,169
Messages
5,879,442
Members
433,431
Latest member
LikeablePringle

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
Top