# Calculate Time Spent On Ticket Minus Non-Business Hours?

Jun 6, 2012

I have a requirement of calculating time spent on ticket, basically a difference between the time a ticket was logged and when it was resolved.

First, working days are Saturday through Wednesday, i.e weekends are Thursday & Friday.

Second, there are different resolver groups or teams which work on a ticket. These teams have different working hours, some work from 07:30 to 15:30 on weekdays, and others work 24/7. Each ticket will be assigned only to one resolver group.I also need to consider holidays.

So, my requirement is to check the resolver group for each ticket, and decide the working hours based on it. After this check has to be done for holidays, and then difference between logged time and resolved time needs to caluculated in minutes.

Tickets can be logged at any time of the day / week, it may not always be logged during working hours only. in such cases calculate should consider next business day / hour as the start time.

Raw data for tickets is available in =Sheet1!\$A\$1:\$E\$21

Ticket NoResolver GroupLogged DateResolved DateTime Spent123456
Team A5/21/2012 1:56:28 PM5/29/2012 2:10:53 PM343543Team B5/21/2012 9:31:02 PM5/27/2012 3:41:22 PM853732
Team C5/22/2012 2:28:06 PM5/26/2012 2:34:31 PM

[Code].....

## Calculate Hours Between Date And Time Within Business Hours?

Apr 4, 2013

find a formula that will calculate the hours between the two below values but only take in to consideration the business hours (from 9 to 17) and exclude any weekends?

08/03/2013 13:32:00
02/04/2013 09:32:50

## Calculate Elapsed Time Based On Business Hours

Dec 8, 2007

I've being trying t calculate an excel formula to work out a order turnaround time based on opening hours.

Example: The store is open from 8 am to 6pm monday to friday, I need to get a formula to work out how long it took from the time the order was logged until it was completed, during the course of the working day - this works fine but if the order was received on 06/12/07 at 5:20 pm then was finally completed by 7/12/07 at 11:55 the next day I need to figure out how to take into consideration of non working hours during that time. (time from 6pm to 8 am next day

example 2 - if order was sent on the 06/12/07 at 01:30pm and completed at 06/12/07 4:30 then I know its taken 3 hours to complete

example 3 - if the order was sent on the 06/12/07 at 5pm and completed next day at 07/12/07 at 10am - then I know it took 3 hours to complete

## Calculate Hours Worked, Minus Weekends

Nov 11, 2009

to calculate how long a ticket is open in our system before being resolved. I don't want to count weekends, and if the ticket is 'suspended', I don't want to count that either. There is also the factor that the ticket 'un-suspend' date may be later than the ticket 'closed' date. Which is the bit that's throwing me.

So, I have the following fields

Ticket Open, Ticket Closed, Ticket Suspended Date, Ticket Unsuspended Date

A sample ticket might be (using above fields)

02/11/09 09/11/09 04/11/09 30/11/09

That 'should' equal two days (16 hours) as the Unsuspend date falls after the close date so it was suspended from the 4th until closure.

Now I want to know, in hours (8 hour day) how long that ticket took to resolve (i.e close), remembering you can't count the time it was suspended, or any time that fell over a weekend. Also not all tickets are suspended.

## Formula To Calculate How Many Hours Minus 30 Mins For Lunch

Jan 12, 2009

If a person does a full day I want the formula to calculate how many hours minus 30 mins for lunch i.e. 7:30 - 4:00 = 8 hours. I have done this and it works fine, the problem comes when a person does a half day i.e. 7:30 - 11:30, this will read 4.5 hours. If this is the case I don't want the 30mins deducted so it should be 4.0 hours worked.

I have high lighted a column in the work sheet (yellow) whereby the user puts an 'x' in the appropriate cell if they are working a half day.

The probem is I cannot incorperate the two formulas in one cell (the Actual hours cell) I have the one formula in the actual hours cell and the other bolted on the end thus giving two different readings.

## Time/date Tracking Only During Business Hours

Mar 19, 2007

i work dispatch at a company and we're trying to track how long it takes for a technician to arrive on-site. my worksheet currently includes the date of call-in (E1) , time of call-in (F1), Service Date (G1), Service Time (H1), among many other field. the easy solution is to use the formula (G1+H1)-(E1+F1), and use the answer as the total amount of time, but the problem is if a customer call in at 3:00 PM and we service them at 9:00 AM the following day, it looks like it took 18 hours to arrive on-site, when in reality, since we close at 5:00 PM and open at 9:00 AM, we only took 2 hours to arrive on-site. is there any formula i can write to account for non-business hours and weekends, or is this a bit above what i should expect from excel?

## Subtracting Business Hours From A Data And Time Value

Jun 26, 2008

I am trying to subtract 12 business hours from a date/time stamp. It has to be during working hours however which are 8AM - 5PM, Monday-Friday.

For example if my value is 6/23/2008 9AM

Subtracting 12 business hours would give me 6/19/2008 3PM.

## Total Time Minus 8 Hours?

Jun 24, 2013

I have a time calculated and I want to know, Out of that time how much is above or below 8 hours.

Ex. 1: 7:30 - 8 = [result] "-:30" mins
Ex. 2: 11:00 - 8 = [result] "3:00" hours

OR

How can I convert 7:30 into 7.5 [decimal] and then subtract that from "8" to get the difference?

I know this is an easy one, I have done it many times before. It's crunch time and I am drawing a blank.

## Date/Time Calculation For WeekEnds/After Business Hours

Jul 23, 2007

What calculation would I enter in a results cell if I wanted to find the delta between 2 times in date format that repersent just the business hours of 8am-5pm, therefore excluding after hours and weekends.

eg.

Date 1 Date 2 Result Time
23/07/07 8:00 24/07/07 14:55 15:55

So far I can't get the caluclation that will compensate for the after hours and week ends.

## Minus Break Time Minutes Off Working Hours?

Jun 15, 2014

basically I am trying to make a time calculator for work, I want it to automatically add the hours up but then also minus break times and then give me a whole paid total hours worked that week.

CALCULATOR.xlsx

## Adding Date And Time Minus Not Working Hours

Sep 11, 2011

I have a data of complaints where I need to present it to the Management in such a way that the SLA period of 8 hours does not pass. Our office working hours are 7 AM till 7 PM. The complaint received should be escalated to concern section within 8 Hours of SLA time. I have the list of dates with received time. The complaint which could not be escalated today would be escalated next day. In this case is should deduct 12 Hours (7 PM to 7 AM, Non-working hours) from the time. How can I insert escalation date so as that it would deduct non working hours from it.

## Formula To Show Time In Hours Going Minus Instead Of Negative

Nov 4, 2012

I have devised a simple formula when a member of staff enters a date and time into a cell it starts deducting from todays date and time. ie:

Cell A1 - Date and time is entered by staff

Cell B1 - Is the above cell +24hrs

Cell C1 - NOW()

Cell D1 - B1-C1 Formatted in hours ( [h] :mm:ss (Like a count down clock)

The problem i have is that i cannot get Cell D1 to show minus ours it just goes to negative and shows continous #####. Is there any way i can get Cell D1 to show the hours it has gone minus by.

## Formula To Calculate Time Allotted Minus Time Used And Show Difference In Hour And Minutes?

Apr 27, 2014

Formula to calculate time allotted minus time used and show the difference in hour and minute.

## Calculate Start Date From Finish Date Minus 14 Working Hours

May 7, 2014

I needs a formula (not VBA) to calculate the required start date.

I have to do a job of 14 working hours and this job must be finished on 05-may-2014 13:00

My working week is from monday u/i friday and every day I work from 08:00-16:00

At what time do I have to start the job to get it done in time.

The formula should give this result: 01-may-2014 15:00

## Workbook Name Always Changes By (minus 2 Business Day)

Feb 13, 2012

My file name constantly changes, it will always be (minus 2 business dates from today)

Now when my macros run it goes between different worksheets so I need to tell it to go to right workbook. I tried below but getting an error 438 'Object doesnt support this property or method'

Code:

Workbooks("file " & Format(WorksheetFunction.WorkDay(Date, -2), "MM DD YYYY") & ".xls").Activate
Sheets("data").Select

## Calculate Running Total Of Ticket Sales With 5 Different Groups?

Jun 17, 2014

I'm trying to calculate a running total of ticket sales with 5 different groups (adult, youth, senior day, senior night, and child) to where once the number of tickets are bought it will update automatically. I enter the tickets in cells B5-B9 where it then calculates the amount due and the change due. I need to put the running total in cells B18-B22.

## Adding Hours Worked Minus Lunch Break IF Over 5 Hours?

Dec 15, 2013

I'm attempting to make a simple time sheet for a handful of employees. I'd like to enter the clock in time and clock out time for each day. The end cell should be the running total for the week. The tricky part for me is having the formula subtract an hour for each day that is over 5 hours.

## Excel 2007 :: Calculate Hours From Time?

Jul 20, 2012

I want to calulate time by decimal the problem is anything after 1 am wont work

example start at 12:25 finsh at 1:45 time should show up as 1.33

using excel 2007

## Calculate Date/time Format Over 24 Hours

Nov 22, 2006

I need to calculate the difference between two cells that are formated like this: 11/10/2006 13:00. Simple subtract only works when the date hasn't changed (the subtract formula seems to focus on the time and ignore the date).

I found a formula that will work, but the results are in regular numbers, I need the hh:mm format and if I change the format of the result column, the time displayed is wrong.

The formula is=((B2-A2)*1440)/60)

If my result is 122.6 in regular numbers, when I convert to hh:mm I get 14:00.

Is there a better way to do this? Also, is there a way to eliminate weekend & holiday hours from the calculation? This is not as important as getting the results to calculate correctly in the hh:mm format.

## Calculate Hours If Both The Start And End Time Are In The Same Cell

Feb 27, 2010

Is it possible to calculate hours if both the start and end time are in the same cell. Unfortunatly the developers of our scheduling program developed it so when you export the schedule to excel it shows Greg in A1 and 3:00pm-9:00pm in A2. I would like to have excel calculate the 6 hours so I can use it to auto generate another spread sheet I am making.

## Calculate Hours Worked After Specific Time

Feb 6, 2008

i have a timesheet that we are trying to use. the problem is the column that says shift diff. if an employee works after 6:30pm for 1and 1/2hr, he is entitled to shift hours. shift hours is between 6m and 8am.

As long as he works after 6.30pm but works for at least one and a half hour, he will get the shift.

if work, 9am to 7:30pm, and have break between 2-3pm, should have 1.5hrs shift and 9.5hrs total
if work, 7:45pm-9:45pm, and have break between 8:30-9pm, total hrs work is 1.5 and shift hrs s/b 1.5hrs
if work 3pm to 12am and have break between 7-8pm, total hrs work is 8 and shift hrs s/b 5hrs

## Calculate Time Difference Greater That 24 Hours

Aug 7, 2008

I have an excel spreadsheet where you enter the start time and end time for job function. Since some of the times cross midnight, I use the formula J3=IF(I3>H3,I3-H3,1+I3-H3) where I is the end time and H is the start time (format hh:mm). This part works fine, however when I sum column J and change my format to Time 37:38:00 (since it is over 24 hrs), it returns a large number of 2234:48:39 which should be closer to 223:00:00.

## Calculate Total Hours If Time Ranges Overlap

Aug 4, 2013

I am trying to determine the total hours of downtime accumulated when there are 2 or more machines down during the same time period. To do this, I need to be able to determine if at any point there are 2 or more pieces of equipment down at the same time, and if this is true, how many hours were overlapped. The attached spreadsheet shows how the data is presented.

## Time Calculation: Calculate How Many Hours Have Elapsed Between To Entries

Jun 22, 2009

I am trying to build a spreadsheet to calculate how many hours have elapsed between to entries; start time (H10) e.g. 9:15 AM and end time (I10) e.g. 12:15 PM. The formula that I am using in the calculation cell field (J10) is (I10-H10+(I10<H10))*24. This formula works great till I wish to include in an IF statement. What I would like is if the total hours calculated with the formula (I10-H10+(I10<H10))*24 is less than 4, return 4 (hours) otherwise the value. As well if there is no start time nor end time entered then return zero.

## Calculate Number Of Hours Between Two Date/time Combinations

Jan 21, 2010

I am trying to find a way to calculate the number of hours between date/times found in separate rows. The attached data set will help to envision what I am talking about.

For each couple of rows, I need to find a way to calculate the number of hours elapsed from row 1 to row 2. In the first example, to calculate the number of hours between 12/2/2009 8:56:51 and 12/4/2009 6:35:27.

## How To Calculate Total Hours Worked When Time Spans From 11 PM To 4 AM Next Day

Sep 17, 2012

Any way to calculate the total hours staff work based on the mininum time of the first transaction to the maximum time of the transactions. I used a DMIN and DMAX function to get those times per employee. The issue is then the time goes over from one day to the next, such as from 11 PM to 4 AM the next day. As you can see in the data below,the fourth record shows the minimum time as 12 AM and the max as 11 PM with total time worked as 23 hours. In this example, the total hours worked should be five hours.

min time
max time
total hours

7:00 AM
16:00
9:00

[Code] .......

## Calculate Time Differrence In Days Hours Minutes

Oct 5, 2007

I have been trying to write a formula to calculate the differrence in days, hours or minutes between 2 cells in Excel.

Here is an example of the two cells

06/08/2011 00:0006/08/2011 12:19

## How To Calculate Work Hours From Only A Start And Finish Date And Time

Feb 28, 2013

I can calculate total hours when a user enters a start date/time and a finish date/time. The kick is I only want to include hours from 2:00 PM to 12:00 AM (10 hour period). So assuming all the start and end times will be in this range, how can i calculate work hours over multiple days? For example: Start date/time = 2/26/13 2:30 PM and end date/time = 2/28/13 10:30 PM. I want my calculated hours to show 28 hours.

Mar 31, 2009

I am using the following formula to calculate business hours.

=(NETWORKDAYS(R9,T9)-1)*("17:00"-"08:00")+IF(NETWORKDAYS(R9,T9),MEDIAN(MOD(T9,1),"17:00","08:00"),"17:00")-MEDIAN(NETWORKDAYS(R9,T9)*MOD(R9,1),"17:00","08:00")

The business hours considered here is 8AM - 5PM, Start time in R9 and End time in T9. Now the problem is its calculating the correct value when the days are same, for e.g.,

Condition 1

When I am giving "31 March 2009 15:00:00" as start time (R9) and "31 March 2009 23:00:00" in end time (T9), I am getting the correct value. i.e, "2:00:00"

Condition 2

While giving "31 March 2009 16:00:00" as start time and "01 April 2009 09:00:00" as end time I am getting a value of "1:00:00", actually the value should be "3:00:00".

Apr 23, 2008

I use this formula at work to calculate business hours from Mon-Fri:

=IF(OR(L10="",L11=""),"",(NETWORKDAYS(L10,L11,\$N\$2:\$N\$23)-1)*(\$Q\$3-\$Q\$2)+IF(OR(ISNUMBER(MATCH(INT(L11),\$N\$2:\$N\$23,0)),WEEKDAY(L11,2)>5),\$Q\$3,MEDIAN(MOD(L11,1),\$Q\$3,\$Q\$2))-IF(OR(ISNUMBER(MATCH(INT(L10),\$N\$2:\$N\$23,0)),WEEKDAY(L10,2)>5),\$Q\$2,MEDIAN(MOD(L10,1),\$Q\$3,\$Q\$2)))

where Q3= business start time 8.30am
where Q2= business end time 5.30pm

thus the difference between 18-Apr-08 16:30 and 21-Apr-08 13:30 is 6 hours.

I now need to adapt this formula for another Department that also works on Saturday from 8.30am to 5.30pm.