Subtotal CountIf

ChrisRitchie

New Member
Joined
Nov 15, 2011
Messages
47
Hi all

Win7, excel 2010

Is there a countif subtotal forumula? I would like count the number of X's in a column, but the total will change after filtering the column.

Thanks
Chris
 
Well a text function on the formulas parses just the results. So try the label column:

=SUMPRODUCT(--(RIGHT(A2:A43,5)="Total"),--(RIGHT(A2:A43,11)<>"Grand
Total"))

To exclude the grand total,

=SUMPRODUCT(--(RIGHT(A2:A43,5)="Total"),--(LEFT(A2:A43,5)<>"Grand"))
 
Upvote 0
Hi Chris

With the header for the filter in A1, and the data in A2:A10, try:

=SUMPRODUCT(--(A2:A10="X"),SUBTOTAL(3,OFFSET(A2,ROW(A2:A10)-ROW(A2),0)))
 
Upvote 0

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