View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default General Excel question

Hi,

1. Enter the value (mark) you want in D1
2. Use the formula
=COUNTIF(B1:B20,D1)

If you want just males or just females with a particular score, in 2007 you
could use
=COUNTIFS(B1:B20,D1,A1:A20,E1)
where E1 contains the number 1 or 2 to indicate male or female and D1 is as
above.

If you want to count both males and females with scores between 40% and 50%
for example
2007:
=COUNTIFS(B1:B20,D1,B1:B20,E1)
with =.4 in D1 and <=.5 in E1
2003
=SUMPRODUCT((B1:B20=D1)*(B1:B20<=E1))
with .4 in D1 and .5 in E1

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"dolpandotcom" wrote:

I have two columns in an excel sheet. One column shows 1 representing male
and 2 represnting female. In the second column I have marks scored by males
and females in a class. In all, I have 20 rows used to store the data for
males and females. The storage is not in any particular order.

Can you please let me know how i can either use the if condition or the
ifcount function to count the number males and females that scored a specific
mark, say 50% in the class?

Thanks.
Dolpandotcom
06/16/09