Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LEG LEG is offline
external usenet poster
 
Posts: 16
Default To count how many are in a certain age group

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default To count how many are in a certain age group

=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))


--


Regards,


Peo Sjoblom


"LEG" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default To count how many are in a certain age group

one way, don't forget the = if it is less than or equal to.
=COUNT(IF(AND(B1:B4<40,B1:B430),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.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"LEG" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default To count how many are in a certain age group

Another option:

=SUMPRODUCT(--(FLOOR(H2:H200,10)=30))

etc.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"LEG" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LEG LEG is offline
external usenet poster
 
Posts: 16
Default To count how many are in a certain age group

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.
--
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:B430),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.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"LEG" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LEG LEG is offline
external usenet poster
 
Posts: 16
Default To count how many are in a certain age group

Thanks, sumproduct worked! My Danish excel03 couldn't figure countif out.
--
LEG


"Peo Sjoblom" skrev:

=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))


--


Regards,


Peo Sjoblom


"LEG" wrote in message
...
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




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LEG LEG is offline
external usenet poster
 
Posts: 16
Default To count how many are in a certain age group

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.
--
LEG

"Sandy Mann" skrev:

Another option:

=SUMPRODUCT(--(FLOOR(H2:H200,10)=30))

etc.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"LEG" wrote in message
...
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




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 109
Default To count how many are in a certain age group

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 wrote:
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.
--
LEG

"Sandy Mann" skrev:



Another option:


=SUMPRODUCT(--(FLOOR(H2:H200,10)=30))


etc.


--
HTH


Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings



Replace @mailinator.com with @tiscali.co.uk


"LEG" wrote in message
...
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- Hide quoted text -


- Show quoted text -


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default To count how many are in a certain age group

Here is the Danish version

=TÆL.HVIS(A2:A500;"=30")-TÆL.HVIS(A2:A500;"39")



--


Regards,


Peo Sjoblom


"LEG" wrote in message
...
Thanks, sumproduct worked! My Danish excel03 couldn't figure countif out.
--
LEG


"Peo Sjoblom" skrev:

=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))


--


Regards,


Peo Sjoblom


"LEG" wrote in message
...
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






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default To count how many are in a certain age group

A1:A20 = age (as an integer)
C1 = 30
D1 = 39

=INDEX(FREQUENCY(A$1:A$20,C1:D1-{1,0}),2)

--
Biff
Microsoft Excel MVP


wrote in message
...
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 wrote:
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.
--
LEG

"Sandy Mann" skrev:



Another option:


=SUMPRODUCT(--(FLOOR(H2:H200,10)=30))


etc.


--
HTH


Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings



Replace @mailinator.com with @tiscali.co.uk


"LEG" wrote in message
...
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- Hide quoted text -


- Show quoted text -





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default To count how many are in a certain age group

I like that one!

--
Biff
Microsoft Excel MVP


"Sandy Mann" wrote in message
...
Another option:

=SUMPRODUCT(--(FLOOR(H2:H200,10)=30))

etc.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"LEG" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count group daniellchiu via OfficeKB.com Excel Discussion (Misc queries) 5 January 10th 08 04:35 AM
Group and count a list of dates Jeffshex Excel Worksheet Functions 0 August 28th 07 05:08 PM
Excel equivalent of sql group by count shikarishambu Excel Worksheet Functions 2 October 31st 06 04:09 PM
count a group of numbers but do not count duplicates Lisaml Excel Worksheet Functions 2 January 26th 05 11:19 PM
Group by count formula nobrabbit Excel Worksheet Functions 1 November 7th 04 09:10 PM


All times are GMT +1. The time now is 06:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"