Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2003
    Location
    Duluth, Minnesota, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Paste Function with Dates (Excel 2000)

    What function returns the legnth of employment based on start date and the current date =NOW() I can type the formula out but would like to pass along to others which Paste Function they would use.
    Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Paste Function with Dates (Excel 2000)

    What is the unit you want? Excel stores dates as a number of days, so if you want the number of days, =TODAY()-A1 is sufficient if the start date is in A1. If you want it in another unit, use the DATEDIF function, for example =DATEDIF(A1,TODAY(),"y")

  3. #3
    New Lounger
    Join Date
    Jul 2003
    Location
    Duluth, Minnesota, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Paste Function with Dates (Excel 2000)

    I'm looking at it to return the number of years to the two decimal. Just wondered if there was a "re defined" Paste Function as I didn't see it in the "DATE" function.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Paste Function with Dates (Excel 2000)

    If you want the number of years with decimals, =(TODAY()-A1)/365.25 is a reasonably accurate approximation.
    If you like, you can create a custom function. It can be in a specific workbook, or in each user's Personal.xls, or in an add-in. To place it in a specific workbook:
    - Activate the workbook.
    - Activate the Visual Basic Editor (Alt+F11)
    - Select Insert | Module
    - Type or copy the following code:

    Public Function Duration(StartDate As Date) As Single
    Duration = (Date - StartDate) / 365.25
    End Function

    - Switch back to Excel (Alt+F11)
    - If the start date is in A1, use =Duration(A1) as formula.
    - Use Format | Cells... or the formatting toolbar to specify the number of decimals displayed.

Posting Permissions

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