Link to home
Start Free TrialLog in
Avatar of Mark Simpson
Mark SimpsonFlag for United States of America

asked on

Need to calculate whether metric was met using business days

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.
Avatar of Shanan212
Shanan212
Flag of Canada image

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?)
Avatar of Mark Simpson

ASKER

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.
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?
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.
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
Avatar of barry houdini
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
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.
=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)
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
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.
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
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.
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am in meetings today and will try this tomorrow. Thanks for the update!
Thank you Barry. That was exactly what I needed!