Thread: VLookup
View Single Post
  #4   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

Jeanette

you won't get the sum of their ages. Try it.

Age range Male Female Total
5 Female 0-9 1 2 3
35 Male 10-19 0 1 1
7 Male 20-29 0 0 0
15 Female 30-39 1 0 1
9 Female 40-49 0 0 0
2 3 5


Have a look at the Help for SUMPRODUCT. The "--" just forces a numeric
value.

Regards

Trevor


"Jeanette" wrote in message
...
Trevor,

can this be a "countproduct" I don't need the sum of their ages, but how
many there are. also are the "- - " IF and IF AND?

"Trevor Shuttleworth" wrote:

Jeanette

here's the first one:

=SUMPRODUCT(--(A1:A10=0),--(A1:A10<=9),--(B1:B10="male"))

Adjust as necessary

Regards

Trevor


"Jeanette" wrote in message
...
I believe this is a Vlookup, but could be mistaken, my problem is as
follows:
I am trying to identify the number of male vs. female in an age range,
houw
would I write this in a formula?


Age Gender
5 Female
35 Male
7 Male
15 Female
9 Female


Age ranges are 0 - 9, 10 - 19, 20 - 29, 30 - 39, etc.