#1   Report Post  
Old April 25th 07, 11:04 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 62
Default Countif

hi everyone

wonder if any of you can help

is it possible to use the countif function on a data source onto which ive
put autofilters

example

name gender question 1 question 2
Bob male yes yes
Stuart male no yes
mary female yes yes

i want to be able to put an autofilter on the gender column, then have a
countif on q1 and q2 columns to count how many say yes and no - eg if i
selected male, q1 would be 1*yes and 1*no, and q2 would be 2*yes and 0*no

hope there is somewhere out there that can help

thanks

stuart

  #2   Report Post  
Old April 25th 07, 01:10 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 4,339
Default Countif

Q1:

=SUMPRODUCT(--($B$2:$B$4="male"),--($C$2:$C$4="yes"))

=SUMPRODUCT(--($B$2:$B$4="male"),--($C$2:$C$4="no"))

Q2:

=SUMPRODUCT(--($B$2:$B$4="male"),--($D$2:$D$4="yes"))

=SUMPRODUCT(--($B$2:$B$4="male"),--($D$2:$D$4="no"))

HTH

"stuart" wrote:

hi everyone

wonder if any of you can help

is it possible to use the countif function on a data source onto which ive
put autofilters

example

name gender question 1 question 2
Bob male yes yes
Stuart male no yes
mary female yes yes

i want to be able to put an autofilter on the gender column, then have a
countif on q1 and q2 columns to count how many say yes and no - eg if i
selected male, q1 would be 1*yes and 1*no, and q2 would be 2*yes and 0*no

hope there is somewhere out there that can help

thanks

stuart

  #3   Report Post  
Old April 25th 07, 02:50 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2006
Posts: 3,718
Default Countif

=SUBTOTAL(3,C5:C7)


"stuart" wrote:

hi everyone

wonder if any of you can help

is it possible to use the countif function on a data source onto which ive
put autofilters

example

name gender question 1 question 2
Bob male yes yes
Stuart male no yes
mary female yes yes

i want to be able to put an autofilter on the gender column, then have a
countif on q1 and q2 columns to count how many say yes and no - eg if i
selected male, q1 would be 1*yes and 1*no, and q2 would be 2*yes and 0*no

hope there is somewhere out there that can help

thanks

stuart

  #4   Report Post  
Old April 25th 07, 07:44 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Nov 2006
Posts: 15,768
Default Countif

Here's a small sample file:

Countif_filter.xls 14kb

http://cjoint.com/?ezuQhoggrD

Biff

"stuart" wrote in message
...
hi everyone

wonder if any of you can help

is it possible to use the countif function on a data source onto which ive
put autofilters

example

name gender question 1 question 2
Bob male yes yes
Stuart male no yes
mary female yes yes

i want to be able to put an autofilter on the gender column, then have a
countif on q1 and q2 columns to count how many say yes and no - eg if i
selected male, q1 would be 1*yes and 1*no, and q2 would be 2*yes and 0*no

hope there is somewhere out there that can help

thanks

stuart





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
Countif ? Tomkat743 Excel Discussion (Misc queries) 4 December 5th 06 05:33 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 12:08 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017