Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CountIF on Filtered data

I have a column of Data that I use a filter on to get desired records. In
some of the columns I have answers like A, B, C and I do a
COUNTIF(CELLRANGE, "A") and it works fine for the entire sheet. Is there a
way to get the countif only to count the items on the filter list.
Column 1 Column 2
Male A
Female A
Male A
Female A
Male B
Male B
Female B
Female B

So on the countif above I get 4 since 4 are A
When I do a filter for only Male, I would like the countif to show only 2
since there are only 2 males that selected A

Is there a way to do this? Any assistance would be appreciated.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default CountIF on Filtered data

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B1:B100,ROW(B1:B100 )-MIN(ROW(B1:B100 )),,1))*
(B1:B100="A"))

--
HTH

Bob Phillips

"Steadman" wrote in message
...
I have a column of Data that I use a filter on to get desired records. In
some of the columns I have answers like A, B, C and I do a
COUNTIF(CELLRANGE, "A") and it works fine for the entire sheet. Is there

a
way to get the countif only to count the items on the filter list.
Column 1 Column 2
Male A
Female A
Male A
Female A
Male B
Male B
Female B
Female B

So on the countif above I get 4 since 4 are A
When I do a filter for only Male, I would like the countif to show only 2
since there are only 2 males that selected A

Is there a way to do this? Any assistance would be appreciated.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using countif in a filtered range Mr E Excel Worksheet Functions 12 December 9th 09 09:19 PM
Having difficulties using COUNTIF with filtered columns stevee22001 Excel Discussion (Misc queries) 1 February 9th 09 05:06 PM
Countif within a filtered sheet George Gee New Users to Excel 3 December 7th 08 10:39 AM
Filtered table using Countif Elba Excel Worksheet Functions 6 June 23rd 08 07:00 PM
COUNTIF Function on filtered data TG Excel Discussion (Misc queries) 2 June 13th 08 03:51 PM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"