How many rows do you believe you will use - the maximum amount over any period of time ?
50 ... 300 ... 2000 ?
I've taken a different route with your project, now that I understand what your goal is.
Simply put: add all the cells in rows C or D or E ... just the ones that are visible when you do Filtering.
So: rather than use VBA macro, why not a formula ?
This formula:
placed in C1 and D1 and E1 (with the appropriate changes to the column range).
The totals appear at the top of the sheet, rather than at the bottom, saves having to scroll all the time.
The first three rows have been "frozen" so you can scroll up and down the sheet but always view the column headers AND
the totals are always visible.
The only change you may need to make is the last part of the formula. Example: If you will be using more than
1,000 rows of data - change E1000 to whatever amount you need. So for 5,000 rows it would be
E5000.
Click on C1 or D1 or E1 ... highlight the numeral 1 (in the FORMULA BAR) and change it to whatever you desire. Then press ENTER.
Questions ?
Are you good with this approach ?
Bookmarks