Age/Date Formula

bpgolferguy

Active Member
Joined
Mar 1, 2009
Messages
469
Hi, I'm trying to come up with a way to make a "Class of" calculation....you know, like class of 2011, etc? What I'm thinking in my head, and it seems right, is if I have the birthday in A1, then the date they turn 18 in cell A2.....have the formula look at that date (only the month and day) in A2 and if it's before (prior) to 6/1 then use the year (yyyy format) from A2 and input it into A3 as my value. However, if the date in A2 is AFTER 6/1, then I want to add 1 year to the date in A2 and input that year (yyyy) into A3.

The reason I use 6/1 is because that's the official "start" date of my organization each year, so depending on which side of it the birthday falls will determine "Class of" date.

Thanks in advance for the help!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I tried it, but don't think it worked. It returned 1994 for someone born in 1993. Did you mean use A2? The date they turn 18? If so, how will that factor in the 6/1 date?
 
Upvote 0
does this work
Excel Workbook
A
17/3/1972
27/3/1990
31991
Sheet1
Excel 2003
Cell Formulas
RangeFormula
A2=TEXT(MONTH(A1)&"/"&DAY(A1)&"/"&YEAR(A1)+18,"mm/dd/yyyy")+0
A3=IF(TEXT(MONTH(A2)&"/"&DAY(A2),"mm/dd")<="06/01",YEAR(A2),YEAR(EDATE(A2,12)))
 
Upvote 0
Jason's suggestion should work for you if you reference A2

=YEAR(A2+214)

214 is the number of days from 1st June until 1st Jan so it automatically gives you the right year. This would do the same

=YEAR(A2)+(MONTH(A2)>5)
 
Upvote 0
slight change to texaslynn's formula

Code:
=IF(TEXT(MONTH(D2)&"/"&DAY(D2),"mm/dd")<="06/01",YEAR(D2),TEXT(EDATE(D2,12),"YYYY"))
 
Upvote 0
Try

in A2 =TEXT(EDATE(A1,216),"mm/dd/yyyy")

in A3 =YEAR(A2+214)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top