VBA AutoFilter data with running total

anthonyexcel

Active Member
Joined
Jun 10, 2011
Messages
258
Office Version
  1. 365
Platform
  1. Windows
I have some sample data that I AutoFilter. (My real data is about 100000 rows) I need to keep a running total on the data. The formula I use normally is =COUNTIF($B$2:B2,B2) . I know that that will not work with filtered data. The criteria is 111 and B

Running TotalIDGroup
1111A
1222B
1333A
2111B
2222A
3111B
1555A
1777B
1888A
2888B
3888A
4888B
4111A
5111B
1125A
1126B

As you can see gives not the desired results: The desired result would be 1, 2 ,3
Running TotalIDGroup
2111B
3111B
5111B

Any help would be appreciated!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
How about
Fluff.xlsm
ABCD
1Running TotalIDGroupVisible
21111A1
31222B1
41333A1
52111B1
62222A1
73111B1
81555A1
91777B1
101888A1
112888B1
123888A1
134888B1
144111A1
155111B1
161125A1
171126B1
Data
Cell Formulas
RangeFormula
A2:A17A2=COUNTIFS($B$2:B2,B2,D$2:D2,1)
D2:D17D2=SUBTOTAL(103,B2)


Fluff.xlsm
ABCD
1Running TotalIDGroupVisible
51111B1
72111B1
153111B1
Data
Cell Formulas
RangeFormula
A5,A7,A15A5=COUNTIFS($B$2:B5,B5,D$2:D5,1)
D5,D7,D15D5=SUBTOTAL(103,B5)
 
Upvote 0
Cool!! Thank you Fluff! Thank you for your help!!! Please enjoy your day!!!!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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