Count if with filters

lcohenvb

New Member
Joined
Oct 27, 2002
Messages
44
I have a worksheet with 19 columns and, at the top, I have a summary table with "Countif" statements. I have added filters and I want the "countif" results to change depending on how the user changes the filter on any one of the 19 columns. I know "subtotal" will change depending on visible cells but I cannot get the "Countif" results to change. Is it possible?

Thanks for any comments. I tried to search the message boards to see if this has come up before but I didn't see a related message.

Lynn
 
Aladin, can you please explain what you did here? as I worked on this one for about 30 min and couldn't figure it out.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Aladin, can you please explain what you did here? as I worked on this one for about 30 min and couldn't figure it out.

In:

=SUMPRODUCT(SUBTOTAL(3,OFFSET($R$11,ROW($R$11:$R$85270)-ROW($R$11),0)),--($R$11:$R$85270=H2))

SubTotal runs Counta (<-- 3) on the subreferences OFFSET creates [OFFSET(R11,0),OFFSET(R11,1),OFFSET(R11,2)...) that are visible, yielding a reference of evaluations consisting of 1's and 0's (1 if there is an item in the visible subreference). The latter is then multiplied with the reference the --($R$11:$R$85270=H2) evaluation in turn creates. The sum of multiplications so obtained is the count we require.
 
Upvote 0

Forum statistics

Threads
1,216,743
Messages
6,132,456
Members
449,729
Latest member
davelevnt

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