Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 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
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
Programming dim Excel Discussion (Misc queries) 7 November 16th 07 11:56 AM
CD Programming nelson Excel Discussion (Misc queries) 0 June 4th 06 04:32 PM
programming ernie Excel Discussion (Misc queries) 4 March 13th 06 02:06 PM
Date programming MeMe Excel Worksheet Functions 2 January 16th 06 06:50 PM
programming date functions Gail Excel Worksheet Functions 2 November 22nd 05 06:32 PM


All times are GMT +1. The time now is 08:14 AM.

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

About Us

"It's about Microsoft Excel"