how to COUNT letters

  • Thread starter Thread starter David V
  • Start date Start date
D

David V

forgive my lack of knowledge on computers, but i made a
list of people with ages, gender, religion, interest, and
so on. and i would like to count, how many are males, how
many are females, how many are catholic, how many likes to
play chess, etc.
this is how i inserted info:
person gender religion
1 m cath
2 m cath
3 f cath
4 m prot
5 f budd
6 f budd
7 f cath
is there a way to count all the "M" in colunmn B(gender)
and so on...? (it is a list of 400+ people, me too i
wished it was only 7 person, easier to count...)

thank you in advance for your help. cheers.
 
David
Use the COUNTIF function
e.g. If the gender is in the range B1 to B400
Use the formula =COUNTIF(B1:B400,"M") at the bottom of
the gender column.
Regards
Michael.
 
the COUNTIF function will allow you to do this.

the format is '=COUNTIF(range,criteria)'

Eg =countif(b1:b20,"m") to count how many males

You can also use a cell Reference as your criteria
=countif(c1:c20,c1) count how many according to what is
in cell C1.

Hope this helps
 
Oh i see, i did do this, but it first didnt work, because
i didnt insert the " " making a circular interference,
which i had no clues what i was.
and now, how do i COUNT people between 45 to 49 years old?
i tried COUNTIF(C1:C400,"45,46,47,48,49")
(45:49) and many more without working.
thank you again.
 
Or, for consecutive numbers like this,

=SUMPRODUCT(COUNTIF(C1:C400,ROW(45:49)))
...

Which is subject to problems if rows are inserted/deleted. Inoculating against
this by using ROW(INDIRECT("45:49")) doesn't seem to gain anything vs the array
constant {45,46,47,48,49}.
 
Back
Top