excel micros

mahen

Registered User.
Local time
Today, 03:27
Joined
Jan 13, 2008
Messages
56
would need a micro to group ages by entering the date of birth.Under 8 - Date of birth (DOB) on or after 1st Sept 1998Under 10 - DOB between 1st Sept 1998 and 31st Aug 2000Under 12 - DOB between 1st Sept 1996 and 31st Aug 1998Under 14 - DOB between 1st Sept 1994 and 31st Aug 1996Under 16 - DOB between 1st Sept 1992 and 31st Aug 1994Under 19 - DOB between 1st Sept 1989 and 31st Aug 1992Under 25 - DOB between 1st Sept 1983 and 31st Aug 1989Over 25 - DOB on or after 1st sept 1983 Under 30 - DOB between 1st Sept 1978 and 31st Aug 1983Under 35 - DOB between 1st Sept 1973 and 31st Aug 1978Under 35 - DOB between 1st Sept 1973 and 31st Aug 1978Under 40 - DOB between 1st Sept 1968 and 31st Aug 1973Over 40 - DOB on or after 1st sept 1968So when you enter the date of birth it should give the age group.Thank you.
 
Something along the lines of

Public function fagegroup(DOB as date) as integer

If Dob >= #1/september/1998# then
fagegroup = 8
ELSEIF DOB > #1/september/1998# and dob <= #whatever then
fagegroup =10
elseif etc

end function
 
Brian,Thank you. I will have a go. Do I need a table to cover all the ranges?regards, - Mahen
 
Brian,Doesn't seems be wokring. Can you enter two lines in an excel sheet and send please. I will do the rest. Thanks- Mahen
 
The attached shows 3 methods.

I think that the 1st date range in post 1 was incorrect

Under 8 - Date of birth (DOB) on or after 1st Sept 1998

Should be

Under 8 - Date of birth (DOB) on or after 1st Sept 2000

Brian
 

Attachments

Brian,I will check and come back to you. Thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom