Thread: Excel 2009 - Diff of two dates

1. Do we compute difference of two dates in complete years, rounding-off 6 or more months to 1 year, and less to 0.

2. Welcome to the Lounge!

Let's say the first date is in cell A1, and the second one in cell B1. The following formula will return the rounded difference in years:

=DATEDIF(A1,B1,"y")+IF(DATEDIF(A1,B1,"ym")<6,0,1)

DATEDIF is an undocumented Excel function - see DATEDIF Worksheet Function.

3. [quote name='HansV' post='781868' date='26-Jun-2009 16:13']Welcome to the Lounge!

Let's say the first date is in cell A1, and the second one in cell B1. The following formula will return the rounded difference in years:

=DATEDIF(A1,B1,"y")+IF(DATEDIF(A1,B1,"ym")<6,0,1)

DATEDIF is an undocumented Excel function - see DATEDIF Worksheet Function.[/quote]

Thanks Hans,
This is exactly i am trying to do.
Is there any collection of undocumented excel function?

regards
Budhrani

4. DATEDIF is the only undocumented worksheet function that I know of.

5. Thanks once again for quick responce.
It feel great to be a member at woody.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•