Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jun 2009
    Location
    India
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do we compute difference of two dates in complete years, rounding-off 6 or more months to 1 year, and less to 0.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    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. #3
    New Lounger
    Join Date
    Jun 2009
    Location
    India
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [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. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    DATEDIF is the only undocumented worksheet function that I know of.

  5. #5
    New Lounger
    Join Date
    Jun 2009
    Location
    India
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
  •