View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default REPOST: Count certain records in filtered data

Are you actually filtering to hide the rows with male in that column?

Or are you just hiding those rows?

I've never seen =subtotal() make a mistake in counting visible data.

I put my =subtotal() formulas in Row 1
my headers in row 2
and my data in Rows 3:xxxx
(No other stuff below my data)

And my subtotal formulas look like:

=subtotal(3,a3:a65536)
to count the number of visible (Non-empty) entries in that column.

====
If you're using xl2003 and have hidden the rows manually, you can use:
=subtotal(103,a3:a65536)


Steve Simons wrote:

Hi

I have seen how to use subtotal to count or sum filtered data, which
is great, but I can't find the answer to what I need to do:-

I have filtered data. Let's say in column A I have departments listed,
with 20 occurences of the department "Accounts". When I filter the
data on another field (say column B, the "Gender" column, looking for
only Females who work at the company), only 15 occurrences of
"Accounts" are visible.

I need to be able to count only the VISIBLE occurences of "Accounts"
(i.e. 15 of them) within the filtered data. If I use subtotal for this
I get 20 returned, when the answer should be 15.

How can I get it to show me the 15 visible records "Accounts" for this
data, filtered on Gender of "Female" ??

TIA

Steve


--

Dave Peterson