Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lucas
 
Posts: n/a
Default count with filter

Hi All,

I was trying to figure it out by myself but failed ;-(

I have a column with names and let's say the names I have a Brad, George,
Pamela, Cindy and Demi. I have also the second column that describes the sex
of the name (male for Brad and George while female for the rest). Finally I
have filter set up in the cell "sex".

What I wanna do is to count the names I have after using filter. E.g. if I
choose "male" I will have 2 names shown so I want this count formula to show
"2". But when I choose sex "female" I'll have 3 names so wanna my formula to
result in "3".

The problem is that I don't know how to set up this formula. Any idea?

Thx, lucas
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default count with filter

Have a look at the SUBTOTAL function in the help file...

=SUBTOTAL(3,Range)

Hope this helps!

In article ,
"lucas" wrote:

Hi All,

I was trying to figure it out by myself but failed ;-(

I have a column with names and let's say the names I have a Brad, George,
Pamela, Cindy and Demi. I have also the second column that describes the sex
of the name (male for Brad and George while female for the rest). Finally I
have filter set up in the cell "sex".

What I wanna do is to count the names I have after using filter. E.g. if I
choose "male" I will have 2 names shown so I want this count formula to show
"2". But when I choose sex "female" I'll have 3 names so wanna my formula to
result in "3".

The problem is that I don't know how to set up this formula. Any idea?

Thx, lucas

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default count with filter

If you are using AutoFilter (or Advanced Filter) you can probably use the
SUBTOTAL function with the function argument set to either the 2 or 3 (see
the list below and check Excel Help).

Example: =SUBTOTAL(3,select_your_col)

Func Num Function
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP

Without filtering, you could use =COUNTIF(select_your_col,"male")

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"lucas" wrote:

Hi All,

I was trying to figure it out by myself but failed ;-(

I have a column with names and let's say the names I have a Brad, George,
Pamela, Cindy and Demi. I have also the second column that describes the sex
of the name (male for Brad and George while female for the rest). Finally I
have filter set up in the cell "sex".

What I wanna do is to count the names I have after using filter. E.g. if I
choose "male" I will have 2 names shown so I want this count formula to show
"2". But when I choose sex "female" I'll have 3 names so wanna my formula to
result in "3".

The problem is that I don't know how to set up this formula. Any idea?

Thx, lucas

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lucas
 
Posts: n/a
Default count with filter

Thx! It helps!

"Domenic" wrote:

Have a look at the SUBTOTAL function in the help file...

=SUBTOTAL(3,Range)

Hope this helps!

In article ,
"lucas" wrote:

Hi All,

I was trying to figure it out by myself but failed ;-(

I have a column with names and let's say the names I have a Brad, George,
Pamela, Cindy and Demi. I have also the second column that describes the sex
of the name (male for Brad and George while female for the rest). Finally I
have filter set up in the cell "sex".

What I wanna do is to count the names I have after using filter. E.g. if I
choose "male" I will have 2 names shown so I want this count formula to show
"2". But when I choose sex "female" I'll have 3 names so wanna my formula to
result in "3".

The problem is that I don't know how to set up this formula. Any idea?

Thx, lucas


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lucas
 
Posts: n/a
Default count with filter

Hi Ron, yeah - helps! Problem solved. thx!

"Ron Coderre" wrote:

If you are using AutoFilter (or Advanced Filter) you can probably use the
SUBTOTAL function with the function argument set to either the 2 or 3 (see
the list below and check Excel Help).

Example: =SUBTOTAL(3,select_your_col)

Func Num Function
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP

Without filtering, you could use =COUNTIF(select_your_col,"male")

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"lucas" wrote:

Hi All,

I was trying to figure it out by myself but failed ;-(

I have a column with names and let's say the names I have a Brad, George,
Pamela, Cindy and Demi. I have also the second column that describes the sex
of the name (male for Brad and George while female for the rest). Finally I
have filter set up in the cell "sex".

What I wanna do is to count the names I have after using filter. E.g. if I
choose "male" I will have 2 names shown so I want this count formula to show
"2". But when I choose sex "female" I'll have 3 names so wanna my formula to
result in "3".

The problem is that I don't know how to set up this formula. Any idea?

Thx, lucas

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
Count Filter Mandeep Dhami Excel Discussion (Misc queries) 5 January 20th 06 01:19 PM
count records which meet filter criteria AKH Excel Discussion (Misc queries) 1 October 31st 05 03:54 PM
Filter Count of Records Retrieved. amkazen Excel Discussion (Misc queries) 2 March 31st 05 10:03 PM
filter and count rexmann Excel Discussion (Misc queries) 2 November 30th 04 02:11 PM
How do I get a count when I filter an excel worksheet? Cheap50 Excel Worksheet Functions 1 November 11th 04 04:18 AM


All times are GMT +1. The time now is 01:59 PM.

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

About Us

"It's about Microsoft Excel"