Hi! I'm looking for at forumla to count how many are in a certain age group.
I have a list of people and their ages and would like to know how many are in
the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
=COUNTIF(A2:A500,">=30")-COUNTIF(A2:A500,">39")
do the same for the other age groups
another way
=SUMPRODUCT(--(A2:A500>=30),--(A2:A500<=39))

Signature
Regards,
Peo Sjoblom
> Hi! I'm looking for at forumla to count how many are in a certain age
> group.
> I have a list of people and their ages and would like to know how many are
> in
> the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
LEG - 07 May 2008 19:58 GMT
Thanks, sumproduct worked! My Danish excel03 couldn't figure countif out.

Signature
LEG
"Peo Sjoblom" skrev:
> =COUNTIF(A2:A500,">=30")-COUNTIF(A2:A500,">39")
>
[quoted text clipped - 9 lines]
> > in
> > the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
Peo Sjoblom - 07 May 2008 21:03 GMT
Here is the Danish version
=TÆL.HVIS(A2:A500;">=30")-TÆL.HVIS(A2:A500;">39")

Signature
Regards,
Peo Sjoblom
> Thanks, sumproduct worked! My Danish excel03 couldn't figure countif out.
>> =COUNTIF(A2:A500,">=30")-COUNTIF(A2:A500,">39")
[quoted text clipped - 11 lines]
>> > in
>> > the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
one way, don't forget the = if it is less than or equal to.
=COUNT(IF(AND(B1:B4<40,B1:B4>30),B1:B4))
this is known as an array formula, when you finish typing it instead of just
hitting enter you need to hit ctl-shift-enter. if you see {} around the
formula you did it right.

Signature
-John
Please rate when your question is answered to help us and others know what
is helpful.
> Hi! I'm looking for at forumla to count how many are in a certain age group.
> I have a list of people and their ages and would like to know how many are in
> the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
LEG - 07 May 2008 19:58 GMT
Hi
Thanks, but "count, if, and" didn't work even if I got {} to make sure I did
it correctly. Probably because I have a Danish version of Excel 03 and
couldn't translate. Something to do with commas and semicolons. I used
"sumproduct" and that worked. But thanks for responding.

Signature
LEG
"John Bundy" skrev:
> one way, don't forget the = if it is less than or equal to.
> =COUNT(IF(AND(B1:B4<40,B1:B4>30),B1:B4))
[quoted text clipped - 5 lines]
> > I have a list of people and their ages and would like to know how many are in
> > the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
Another option:
=SUMPRODUCT(--(FLOOR(H2:H200,10)=30))
etc.

Signature
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk
> Hi! I'm looking for at forumla to count how many are in a certain age
> group.
> I have a list of people and their ages and would like to know how many are
> in
> the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
LEG - 07 May 2008 20:12 GMT
Hi - thanks for responding, but as I do know the Danish word for "floor", I
can't figure out what it means when put together with the formula
"sumproduct" and what it should do. And neither does the Danish help program!
But I did use a sumproduct formula which worked.

Signature
LEG
"Sandy Mann" skrev:
> Another option:
>
[quoted text clipped - 7 lines]
> > in
> > the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on
krcowen@aol.com - 07 May 2008 20:34 GMT
Sandy
SUMPRODUCT is a pretty powerful function and I continue to find new
uses for it; but, it seems like the FREQUENCY function was pretty much
made for your situation. You might want to break out the old English-
Danish dictionary and see if that function will work for you.
Good luck.
Ken
Norfolk, Va
> Hi - thanks for responding, but as I do know the Danish word for "floor", I
> can't figure out what it means when put together with the formula
[quoted text clipped - 30 lines]
>
> - Show quoted text -
T. Valko - 08 May 2008 06:23 GMT
A1:A20 = age (as an integer)
C1 = 30
D1 = 39
=INDEX(FREQUENCY(A$1:A$20,C1:D1-{1,0}),2)

Signature
Biff
Microsoft Excel MVP
Sandy
SUMPRODUCT is a pretty powerful function and I continue to find new
uses for it; but, it seems like the FREQUENCY function was pretty much
made for your situation. You might want to break out the old English-
Danish dictionary and see if that function will work for you.
Good luck.
Ken
Norfolk, Va
On May 7, 3:12 pm, LEG <L...@discussions.microsoft.com> wrote:
> Hi - thanks for responding, but as I do know the Danish word for "floor",
> I
[quoted text clipped - 34 lines]
>
> - Show quoted text -
T. Valko - 08 May 2008 06:24 GMT
I like that one!

Signature
Biff
Microsoft Excel MVP
> Another option:
>
[quoted text clipped - 7 lines]
>> are in
>> the age group f.eks. between the ages of 30 and 39, 40 and 49 and so on