#1   Report Post  
John_Lamb
 
Posts: n/a
Default "COUNTIF(AND"

I have 2 columns of data the first contains students classes, the
second their gender. I would like to enter a function that counts the
male or female students in a group. I have tried "COUNTIF(AND.... with
no success
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(A1:A100="class"),--(B1:B100="male"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"John_Lamb" wrote in message
om...
I have 2 columns of data the first contains students classes, the
second their gender. I would like to enter a function that counts the
male or female students in a group. I have tried "COUNTIF(AND.... with
no success



  #3   Report Post  
CLR
 
Posts: n/a
Default

Hi John..........

A Pivot Table could be used here also to give you a nice display of each
Class and the count of Males and Females in each and the total students in
each as well.........

Vaya con Dios,
Chuck, CABGx3



"John_Lamb" wrote in message
om...
I have 2 columns of data the first contains students classes, the
second their gender. I would like to enter a function that counts the
male or female students in a group. I have tried "COUNTIF(AND.... with
no success



  #4   Report Post  
JulieD
 
Posts: n/a
Default

adding to Bob's response - check out
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

for details on how the SUMPRODUCT function works

Cheers
JulieD

"Bob Phillips" wrote in message
...
=SUMPRODUCT(--(A1:A100="class"),--(B1:B100="male"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"John_Lamb" wrote in message
om...
I have 2 columns of data the first contains students classes, the
second their gender. I would like to enter a function that counts the
male or female students in a group. I have tried "COUNTIF(AND.... with
no success





  #5   Report Post  
John_Lamb
 
Posts: n/a
Default

Thanks to all for the help, I managed using the sumproduct function. I
will have a look at pivot tabled as well.
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



All times are GMT +1. The time now is 09:04 PM.

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"