Results 1 to 4 of 4

Thread: formula help

  1. #1
    3 Star Lounger
    Join Date
    Jul 2005
    Location
    Bahrain
    Posts
    373
    Thanks
    1
    Thanked 0 Times in 0 Posts

    formula help

    hi all,

    i need a formula that compute the time between 4 date columns that are bsed on year & month and produce the results in the last column.
    Attached Files Attached Files
    TIA
    dubdub

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    DubDub,

    Interestingly this works! It surprised me but the way you are calculating it does.
    =($C3-$A3)*12+($D3-$B3)
    dubdub.JPG
    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    3 Star Lounger
    Join Date
    Jul 2005
    Location
    Bahrain
    Posts
    373
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thank you RG. for your help and prompt response.
    TIA
    dubdub

  4. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,825
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi RG/dubdub

    You may be interested in a more 'general purpose' date calculation:
    DATEDIF is an "undocumented" function which means it is not listed
    with other Date functions under the formula tab in Excel.

    The DATEDIF function can be used to calculate the time period or difference between two dates.
    This time period can be calculated as the number of days, months, or years between the two dates

    To use DATEDIF you must type it manually into a cell on the worksheet rather than using the dialog box method available for other functions.
    The syntax for the DATEDIF function is:

    =DATEDIF(startDate,endDate,"interval")

    ..where "interval" can be "D", "M" or "Y" for days, months or years respectively.

    The Interval argument can also contain a combination of days, months, and years in order to increase the variety of answers returned by the function.
    "YM" - calculates the number of months between two dates as if the dates were in the same year
    "YD" - calculates the number of days between two dates as if the dates were in the same year
    "MD" - calculates the number of days between two dates as if the dates were in the same month and year

    I have attached a version of your file with the DATEDIF function..

    zeddy
    Attached Files Attached Files

Posting Permissions

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