# How do I get the MTTR (Mean Time to Resolve) with Excel

I need to get the MTTR for trouble tickets, excluding non-business hours, weekend and holidays. Our Business hours are 7 AM - 7 PM. In my sheet C2 has the created time and date,  and K2 has the closed time and date.

For Example:
C2 = 2014/11/05 15:18:58
K2 = 2015/02/17 10:45:16
LVL 19
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Hi epamias -
Those two times look like Mean Time to me, if I understand Mean Time.  Are you saying the times must fall within the time 7AM-7PM during the weekdays?  So it is not possible for time to fall outside of 7AM-7PM, and cannot be on weekends and holidays?   It appears your C2 time is on a Tuesday in the morning, and your K2 time is Wednesday after lunch.  So, what are you looking for?  Thanks.  - Tom
I need the amount of time it took to close the ticket, excluding non-business hours, weekends and holidays. If you notice the dates and times are from 2014 and 2015.

For example - If the ticket was created at 7am and I closed it 10 AM it would be 3 hours, but if I closed it next day at 10 am I would need to exclude from 7pm - 7am next day.
Commented:
Try this formula:

=(NETWORKDAYS(C2,K2,Holidays)-1)*(0.791667-0.291667)+MOD(K2,1)-MOD(C2,1)

For Holidays, go to the formula tab and select define names. Use the name Holidays and set the range anywhere in your workbook you want to list all the holiday dates. Enter all the holidays and any other days where there was no work performed. This should give you the result you're looking for.

Flyster

Experts Exchange Solution brought to you by