Solved

Need to calculate whether metric was met using business days

Posted on 2013-01-15
15
213 Views
Last Modified: 2013-01-28
I need to create a report that shows whether the acknowledgement was completed within 3 business days of being created. I would like the Acknowledgement date/time fields to be filled in green if they met the requirement and in red if not.

Fields provided:
Ticket Number
Create Date/Time
Acknowledgement Date/Time

Definition of Business Days: Mon - Fri, 8am-5pm CST

How can I do that?
Formulas and rules would be preferable to VB as I am not familiar with that.
0
Comment
Question by:awp2012
  • 7
  • 4
  • 4
15 Comments
 
LVL 13

Expert Comment

by:Shanan212
Comment Utility
How would you know the acknowledgement was met? I understand that it has a creation date. Does it has a completion date? (so that we can check if it was completed within 3 days?)
0
 

Author Comment

by:awp2012
Comment Utility
Sometimes before working on an issue a team selects Acknowledged, indicating they are aware it is open and they need to prioritize it. So there is an Acknowledgement Date/Time field.

We also have completion but have other reports that indicate whether items were resolved within 30 min or 4 hrs for higher impact issues.

My biggest trouble is trying to figure out how to identify if it was met within 3 business days for requests which have a lower impact.
0
 
LVL 13

Expert Comment

by:Shanan212
Comment Utility
Maybe I am wrong.

You have a starting/acknowledged date. How would you know if it was 'met within 3 business days'

If you want an indication of days left to complete, that I can do. But without a end point, I cannot tell you if it was completed or not. I mean you need something to compare correct?
0
 

Author Comment

by:awp2012
Comment Utility
I probably wasn't clear, sorry. The objective is whether the acknowledgement was accomplished within 3 business days. We have other reports that focus on the completion of the request.

Think of it as using the acknowledge date/time as the end date/time - it's just another field.

If I'm looking at minutes, hours, days, that is easy. But calculating based upon business days (Mon-Fri 8a-5p CST) is difficult.
0
 
LVL 13

Expert Comment

by:Shanan212
Comment Utility
see attached and let me know.

My assumption in this case is that you want to know how many workdays it took to acknowledge.
see.xlsx
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
Will the create/acknowledgement dates/times always be within the working hours? If so then with create time/date in A2 you can get exactly 3 working days later (including time) by using this formula

=WORKDAY(A2,3)+MOD(A2,1)

so you can just compare that to B2, if it's later then you are late so you can format cells green by default and use conditional formatting to format the others red by using this formula as the condition

=B2>WORKDAY(A2,3)+MOD(A2,1)

This requires Excel 2007 or later - post back if you can't make it work, preferably with an example worksheet

regards, barry
0
 

Author Comment

by:awp2012
Comment Utility
The tickets could be open at any time in a 24 hour period. I need to see them in partial days. Such as in the attached example it shows 4 days when the acknowledgement was only 4 min late.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Expert Comment

by:Shanan212
Comment Utility
=IF(AND(INT(STARTTIME)=INT(ENDTIME),NOT(ISNA(MATCH(INT(STARTTIME),HOLIDAYLIST,0)))),"0 DAYS 0 HOURS", IF(INT(STARTTIME)=INT(ENDTIME),
 "0 DAYS " & ROUND(24*(ENDTIME-STARTTIME),2)&"HOURS", MAX(NETWORKDAYS(STARTTIME+1,ENDTIME-1,HOLIDAYLIST),0)+ INT(24*(((ENDTIME-INT(ENDTIME))-(STARTTIME-INT(STARTTIME)))+ (ENDDATE-STARTDATE))/(24*(ENDDATE-STARTDATE)))& " DAYS "&MOD(ROUND(((24*(ENDTIME-INT(ENDTIME)))-24*STARTDATE)+ (24*ENDDATE-(24*(STARTTIME-INT(STARTTIME)))),2), ROUND((24*(ENDTIME-STARTDATE)),2))&" HOURS "))

Open in new window


Try this. Untested. Try naming a cell as endtime and starttime with respective times in it (eg: 8 AM and 5 PM)
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
If you have create time/date in B2 and acknowledgement time/date in C2 then you can use this formula in D2 for the elapsed hours

=(NETWORKDAYS(B2,C2)-1)*(H$2-G$2)+IF(NETWORKDAYS(C2,C2),MEDIAN(MOD(C2,1),G$2,H$2),H$2)-MEDIAN(NETWORKDAYS(B2,B2)*MOD(B2,1),G$2,H$2)

where G2 and H2 define the start and end time of the working day

That will work whether start  times/dates are in the working day or not

On the attached I set up the conditional formatting to format red where the elapsed time exceeds 27 hours (3 days) - i.e. the value in I2

Times/dates are randomly generated by formulas - press F9 to generate new ones - conditional formatting will update accordingly.

regards, barry
business-hours-barry.xls
0
 

Author Comment

by:awp2012
Comment Utility
barryhoudini your formula works. I am unable to figure out the conditional formatting. I can see the formatting works the way I need it to in your sample.
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
All that I did with the formatting was initially to use regular formatting to format the whole of B2:D11 green.

Then I selected that range again and used this formula in conditional formatting

=$D2>$I$2

that formats each row if the column D value exceeds the value in I2 (currently 27:00 = 3 days)

If you need I can explain further how you set that up - which version of Excel are you using?

regards, barry
0
 

Author Comment

by:awp2012
Comment Utility
I tried that but all of the acknowledgement times were correct (except those which were not acknowledged at all and those fields showed all ###### instead of the time).

I made a change to one of the acknowledgement times which would have clearly been over the 27 hrs and it didn't change the background for that cell. It did change another cell to red that was in compliance.

I am using Excel 2010.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
Comment Utility
OK, you can make a change to the formula like this, so that you get a blank if both date/times are not filled in

=IF(COUNT(B2,C2)=2,(NETWORKDAYS(B2,C2)-1)*(H$2-G$2)+IF(NETWORKDAYS(C2,C2),MEDIAN(MOD(C2,1),G$2,H$2),H$2)-MEDIAN(NETWORKDAYS(B2,B2)*MOD(B2,1),G$2,H$2),"")

and then change conditional formatting formula to

=($D2>$I$2)*($D2<>"")

If you are getting the wrong rows formatted then your ranges/formulas may be mismatched - my conditional formatting formula refers to D2 because that's the first row of the "applies to" range - make sure that your "applies to" range and formula references match - if you can't make it work can you attach the workbook here (or a representative example)

regards, barry
0
 

Author Comment

by:awp2012
Comment Utility
I am in meetings today and will try this tomorrow. Thanks for the update!
0
 

Author Closing Comment

by:awp2012
Comment Utility
Thank you Barry. That was exactly what I needed!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now