View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default How can I calculate current school year from DOB ongoing?

Hi Ron,

yes, you're right - in my testing I was more concerned with ensuring
the change of year group always happened on 1st September and didn't
notice that the year groups hadn't changed with values of today beyond
1st Sept in any one year.

I've tested your formula with my set-up and yours works.

Drat !! <bg

Pete

On Jan 22, 10:11*pm, Ron Rosenfeld wrote:
On Thu, 22 Jan 2009 13:34:38 -0800 (PST), Pete_UK wrote:
Okay, with dates of birth starting in A1, put this in B1:


=DATEDIF(A1,DATE(YEAR(TODAY()),8,31),"y")-5


and copy down.


Tested for various dates of birth spanning 1995 to 2003, and values of
TODAY going out to 2013.


Hope this helps.


Pete


Not quite Pete.

The problem with this approach is exemplified by the following, which includes
some assumptions which might be US-centric.

The school year likely begins 9/1

Given the OP's student DOB of 1/30/96,

If Today = today (22 Jan 09) then he is in the 8th year. *However, come 1 Sep
2009, he should be in his ninth year. *Your formula will still return 8 up
through 31 Dec 2009.

I think my previously posted suggestion:

=DATEDIF(A1,DATE(YEAR(A2)+(MONTH(A2)8),8,31),"y")-5

where

A1: * * DOB
A2: * * date to be tested, could be TODAY()

will return the desired answer *(if my various assumptions are correct)..

--ron