Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Programming
Mark,
To calculate the Years =IF(DAY(A1)<15,DATEDIF(DATE(YEAR(A1),MONTH(A1),1), B1,"Y"),DATEDIF(DATE(YEAR(A1),MONTH(A1)+1,1),B1,"Y ")) To calculate the Months =IF(DAY(A1)<15,DATEDIF(DATE(YEAR(A1),MONTH(A1),1), B1,"YM"),DATEDIF(DATE(YEAR(A1),MONTH(A1)+1,1),B1," YM")) Dan E "Mark" wrote in message ... Hi, I've been asked to create a spreadsheet which creates a date calculation for two sets of dates (birthdate, benefit eligibility date). However, there is some criteria that needs to be met: 1. If the person is born on the 15th of the month or earlier, than the member is a month older (except if born on the 1st, that date would be treated normally). 2. If the person is born on the 16th of the month or later, then that month doesn't count. Example 1: DOB: Jan. 8/46, Date Eligible: Feb. 1/04 This person would be 58 years and 1 month old (because birthdate is before Jan. 16th) IF, the "Date Eligible" was Jan. 1/04, then the person would be 58 years old. Example 2: DOB: Jan. 16/46, Date Eligible: Feb. 1/04 This person would be 58 years old (because birthdate is after Jan. 16th) If anyone can help me with this I would really appreciate it. Thanks, Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Programming | Excel Discussion (Misc queries) | |||
CD Programming | Excel Discussion (Misc queries) | |||
programming | Excel Discussion (Misc queries) | |||
Date programming | Excel Worksheet Functions | |||
programming date functions | Excel Worksheet Functions |