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
Edward PamiasTeam Lead RRS DeskAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

tomfarrarCommented:
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
Edward PamiasTeam Lead RRS DeskAuthor Commented:
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.
FlysterCommented:
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

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Edward PamiasTeam Lead RRS DeskAuthor Commented:
OK this looks good but I just noticed another field which is not always populated in B2, if that has date and time I need to use that over C2, if nothing exists in B2 than use C2. Sorry to add the twist to it.
Edward PamiasTeam Lead RRS DeskAuthor Commented:
I am going to accept this as my solution and ask another question for my other problem. Thank you!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.