count filtered rows

lcornaro

New Member
Joined
Oct 7, 2013
Messages
7
Hi, I filtered my table and need to count the "Y"s in a column. The formula I have is =COUNTIF(K2:K3480;"Y") but it doesnt update if I filter the table.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
If you are actually filtering on the K column (ie for value Y) and then simply need to count all the visible rows, you can use SUBTOTAL I believe:

=SUBTOTAL(3;K2:K3480)
 
Upvote 0
=SUMPRODUCT(SUBTOTAL(3,OFFSET(K2:K3480,ROW(K2:K3480)-ROW(K2),0,1)),--(K2:K3480="Y"))

Azumi
 
Upvote 0
Or

=SUMPRODUCT(SUBTOTAL(3,OFFSET(K2,ROW(2:3480)-2,))*(K2:K3480="y"))

Azumi
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,090
Members
448,944
Latest member
sharmarick

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