Closed Thread
Results 1 to 15 of 15

Calculating Net Working Hours.

Hybrid View

  1. #1
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    They are not pretty formulas, but you can find the one that I think will work for you at the top of this page:

    http://www.cpearson.com/excel/DateTimeWS.htm
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,698
    I don't think Chip's formula will work when the ticket can be created at any time.

    Can you clarify what you actually want to calculate, do you want to calculate the time and date that you must finish the job or do you want to calculate how many working hours have passed since the ticket was created (and thereby calculate how many hours you have left)?

    The latter is easier to do.

    What time is lunch?

  3. #3
    Forum Contributor
    Join Date
    03-13-2008
    MS-Off Ver
    Office 365
    Posts
    134
    i want to calculate how many working hours are passed and how many working hours are left to complete the ticket.
    Suppose a ticket was created on 3/12/2008 10:00 AM and current time is 3/13/2008 10:00 AM so it should show "Age of Ticket = 8 hours" and "Time Remaining = 32 hours"

    Lunch time is 14:00PM to 15:00PM
    Last edited by amitmodi_mrt; 03-13-2008 at 04:58 PM.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,698
    OK, this formula is a little complex....

    Assuming the ticket start time/date is in A2 and in C2 you have the current time [ use =NOW()] then use this formula in D2 for time passed

    ="Age of ticket = "&TEXT((NETWORKDAYS(A2,C2)-1)/3+IF(NETWORKDAYS(C2,C2),MEDIAN(MOD(C2,1)-MEDIAN(0,1/24,MOD(C2,1)-7/12),K$3-1/24,K$2),K$3-1/24)-MEDIAN(NETWORKDAYS(A2,A2)*(MOD(A2,1)-MEDIAN(0,1/24,MOD(A2,1)-7/12)),K$3-1/24,K$2),"[h]:mm")
    K2 should contain the weekday start time, i.e. 08:00 and K3 should contain the end time, i.e. 17:00

    Then for time remaining use this formula

    =IF(MID(D2,17,5)+0>="40:00"+0,"Late","Time Remaining = "&TEXT("40:00"-MID(D2,17,5),"[h]:mm"))

    Note: NETWORKDAYS is part of Analysis ToolPak add-in

  5. #5
    Forum Contributor
    Join Date
    03-13-2008
    MS-Off Ver
    Office 365
    Posts
    134
    What do you have in K$1 and K$2..?
    The formulla is working but not giving exact result.. i put the start time as 3/13/2008 10:00 in A2 and =now() in C2 (My current time is 3/14/2008 3:33 AM, I am in India) it is showing "Age of ticket = 4:46"
    however it should show "Age of ticket =7:00" as working hours ends at 17:00 PM.
    =============================================================

    I AM SORRY... IT WAS MY MISTAKE...
    IT WORKED.. I DIDNT NOTICED WHAT YOU WRITTEN FOR K2 AND K3...
    THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU VERY MUCH......

    Can i have your email id so that i can contact you if i need any help in future....?
    Last edited by amitmodi_mrt; 03-13-2008 at 06:12 PM.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,698
    I prefer to keep any communication within the forum. If you have any further queries on this subject then just post another reply to this thread....or you can PM me if I don't respond

Closed 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