+ Reply to Thread
Results 1 to 7 of 7

Calculate Time between 2 dates and if within time frame

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    32

    Calculate Time between 2 dates and if within time frame

    Hi

    I have a spreadsheet, which has colums of dates - received and sent , both in format - dd/mm/yyyy hh:mm.

    I need to calculate the response times, between the received and sent dates. This also needs to exclude weekends & holidays. (struggling as would like to show results in Days/Hours/Minutes).

    I then need to know if the item has been sent within time frame (Yes/No answer) . There are differing time frames, depending on the item.

    I have creating a reference for the time frames and holidays.

    I have been messing about with NETWORKDAYS but can’t get it to work.

    I then need to pivot table the data, so I can create average send times for the MS and category column’s

    I have attached a blank sheet example, if some one could input the formulas that would be amassing.


    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Calculate Time between 2 dates and if within time frame

    Try this out, then format as you need

    =NETWORKDAYS(D2,E2)+E2-D2-(INT(E2-D2))
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    01-20-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Calculate Time between 2 dates and if within time frame

    Thanks

    Just one prob - the response result seems to be a day out, example (larger data set) -

    21/11/2011 11:45 21/11/2011 14:02 01 02:17

    (should be zero days)

    can you tweak the formula?

    Thanks

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Calculate Time between 2 dates and if within time frame

    try this

    =NETWORKDAYS(D2,E2)+E2-D2-(INT(E2-D2))-1

    note: you will also need to add the reference to your holidays into the NETWORKDAYS function

    Edit:
    here is the update including the holiday reference
    =NETWORKDAYS(D2,E2,Holidays!B$2:B$7)+E2-D2-(INT(E2-D2))-1
    Last edited by DGagnon; 04-11-2012 at 09:25 AM.

  5. #5
    Registered User
    Join Date
    01-20-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Calculate Time between 2 dates and if within time frame

    Cool got that to work and can pivot table the data.

    Can you show me how to do the second requet - i.e. has it been sent within time frame?

    Thanks

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Calculate Time between 2 dates and if within time frame

    you can use this:
    =IF(F2<=VLOOKUP(C2,'Time Frames (working days)'!A:B,2,0),"Yes","No")

    note: there is a training space in your Time Frames (working days) sheet, after Info Email that will need to be removed.

  7. #7
    Registered User
    Join Date
    01-20-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Calculate Time between 2 dates and if within time frame

    Thanks!!!!!!!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1