#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default counting age groups

hi all,
I have a column where i put the students' Dates of Birth. I want a formula
that calculate different age groups from that column.
for example: formula to calculate the number of students between 10 and 15
years, and another formula to calculate the number of students older than 15.
How do i do that?
Many thanks - Tendresse
Using Excel 2003
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default counting age groups

Assume DOBs are within A2:A100

.. number of students between 10 and 15 years:

=SUMPRODUCT((A2:A100<"")*(DATEDIF(A2:A100,TODAY() ,"y")=10)*(DATEDIF(A2:A100,TODAY(),"y")<=15))

.. number of students older than 15:

=SUMPRODUCT((A2:A100<"")*(DATEDIF(A2:A100,TODAY() ,"y")15))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Tendresse" wrote:
I have a column where i put the students' Dates of Birth. I want a formula
that calculate different age groups from that column.
for example: formula to calculate the number of students between 10 and 15
years, and another formula to calculate the number of students older than 15.
How do i do that?
Many thanks - Tendresse
Using Excel 2003

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default counting age groups

hi Max,
thanks for your prompt reply. I adjusted the formula to suit my workbook as
follows:

=SUMPRODUCT(('Main Data'!E10:E9654<"")*(DATEDIF('Main
Data'!E10:E9654,TODAY(),"y")=10)*(DATEDIF('Main
Data'!E10:E9654,TODAY(),"y")<15))

but i'm getting an #NUM! error .. any idea why?

"Max" wrote:

Assume DOBs are within A2:A100

.. number of students between 10 and 15 years:

=SUMPRODUCT((A2:A100<"")*(DATEDIF(A2:A100,TODAY() ,"y")=10)*(DATEDIF(A2:A100,TODAY(),"y")<=15))

.. number of students older than 15:

=SUMPRODUCT((A2:A100<"")*(DATEDIF(A2:A100,TODAY() ,"y")15))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Tendresse" wrote:
I have a column where i put the students' Dates of Birth. I want a formula
that calculate different age groups from that column.
for example: formula to calculate the number of students between 10 and 15
years, and another formula to calculate the number of students older than 15.
How do i do that?
Many thanks - Tendresse
Using Excel 2003

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default counting age groups

Fixed it ... i found a couple of dates in the range bigger than today's date.
Thanks a lot for your help .. much appreciated.

"Tendresse" wrote:

hi Max,
thanks for your prompt reply. I adjusted the formula to suit my workbook as
follows:

=SUMPRODUCT(('Main Data'!E10:E9654<"")*(DATEDIF('Main
Data'!E10:E9654,TODAY(),"y")=10)*(DATEDIF('Main
Data'!E10:E9654,TODAY(),"y")<15))

but i'm getting an #NUM! error .. any idea why?

"Max" wrote:

Assume DOBs are within A2:A100

.. number of students between 10 and 15 years:

=SUMPRODUCT((A2:A100<"")*(DATEDIF(A2:A100,TODAY() ,"y")=10)*(DATEDIF(A2:A100,TODAY(),"y")<=15))

.. number of students older than 15:

=SUMPRODUCT((A2:A100<"")*(DATEDIF(A2:A100,TODAY() ,"y")15))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Tendresse" wrote:
I have a column where i put the students' Dates of Birth. I want a formula
that calculate different age groups from that column.
for example: formula to calculate the number of students between 10 and 15
years, and another formula to calculate the number of students older than 15.
How do i do that?
Many thanks - Tendresse
Using Excel 2003

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default counting age groups

"Tendresse" wrote:
Fixed it ... i found a couple of dates in the range bigger than today's date.
Thanks a lot for your help .. much appreciated.


Welcome, glad you got it working over there.
Perhaps you could just take a moment to press the "Yes" button to the
question: "Was this post helpful to you?" from where you're reading this.
It'll ensure a longer shelf life to this thread for the general benefit of
other readers.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
counting age groups chedd via OfficeKB.com Excel Worksheet Functions 5 September 27th 07 07:52 AM
Counting a single value across multiple cell groups Evilivan Excel Discussion (Misc queries) 4 December 25th 06 05:59 PM
Counting groups of exact numbers in a huge list (column) pgiessler Excel Discussion (Misc queries) 1 August 16th 06 05:00 PM
Counting groups of exact case numbers w/letters in them. tjtjjtjt Excel Discussion (Misc queries) 2 November 25th 04 08:13 PM
Counting groups exact case numbers Domenic Excel Discussion (Misc queries) 0 November 25th 04 06:57 PM


All times are GMT +1. The time now is 03:17 PM.

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

About Us

"It's about Microsoft Excel"