Excel Countif of filtered data

kashif.special2005

Active Member
Joined
Oct 26, 2009
Messages
443
Hi,

Could we use COUNTIF function of filtered data, like we use subtotal for sum and average etc.,

Scenario:-

like I have columns Area in column A, and Sales in column B, and when I filter in column A like "north" then I want to count sales, that how many sales are greater than 500, and when I changes filter from "north" to "south" the result should change accordingly, like subtotal.

Thanks
Kashif
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You can create a data validation for the area and then apply formula sumif for the entire sales. The formula is:
=SUMIF(E3:E7,G3,F3:F7)
E3:E7 is area
G3 is area for which you wanna get sales (you can have data validation in G3 instead of filtering entire data time and again)
F3:F7 is sales
 
Upvote 0
Try this, adjusting ranges to suit your data.

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B14,ROW(B2:B14)-ROW(B$2),,1))*(B2:B14>500))
 
Upvote 0

Forum statistics

Threads
1,223,932
Messages
6,175,468
Members
452,646
Latest member
tudou

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