View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Count Text in Columns

Try these:

Count of males:

=COUNTIF(A1:A20,"M")

Count of females:

=COUNTIF(A1:A20,"F")

Percentage of males to females:

=COUNTIF(A1:A20,"M")/SUM(COUNTIF(A1:A20,{"M","F"}))

Format as Percentage

Count of body parts:

=COUNTIF(A1:A20,1)
=COUNTIF(A1:A20,2)

Adjust range to suit.

--
Biff
Microsoft Excel MVP


"Myjogli" wrote in message
...
I've tried everything and can't seem to get this one.

I have a lot of different rows of text that I need counted a specific way.

I have written an M for a male and F for a female (there are other text
values as well).

I'd like to find some way to count all the M's and all the F's to see how
many Males and Females I have. Then I'd like to determine the % of Males
to
Females. Anyway to do this all in one cell? Or is it easier to do it in
separate ones?

I also have number values that correspond to body parts, i.e. a 1 = Ankle,
2
= Knee, etc. So as I would like to count all the 1's to see how many
Ankles
I have, and count all the 2's to see how many Knees I have, etc.

Thanks so much for your help, this one is really killin' me.