Calculate impact multiple incidents have on a day

Glassford

New Member
Joined
Oct 2, 2018
Messages
4
So I am after some help with the table bellow, I'm trying to calculate how much time is lost per day due to incidents happening. The table on the top is the information we are given which includes start/finish times, duration and how much impact it had to business.

What I am trying to make is a formula to sit in that "Availability" column which will tell me the percentage of hours not impacted for the day. I was able to get the maths working for a single incident but I am not sure how to calculate it over an array. Any help would be incredible thanks.

StartFinishDurationWeightingImpact
1/8/18 0:00
6/8/18 0:00120:0010%12:00
1/8/18 0:003/8/18 0:0048:0010%4:48
1/8/18 0:001/8/18 12:0012:0010%1:12
DayTotal ImpactAvailability
1/8/186:0075%
2/8/184:4880%
3/8/182:2490%
4/8/182:2490%
5/8/182:2490%
6/8/180:00100%

<tbody>
</tbody>
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I'm a bit confused sorry... is the Total Impact column calculated from the Availability column? Seems that the Total Impact is the difficult calculation, not the percentage of 6 out of 24 hours?
 
Last edited:
Upvote 0
Anyway, marching on hopefully in the right direction, assuming "Start" is in cell B2, the following formula in the Availability line should do the trick! Note that it is an array formula and hence should be entered using CONTROL+SHIFT+ENTER. You'll see {...} appear around the formula if entered correctly.

=1-SUM(IF((B8>=$B$3:$B$5)*(B8<$C$3:$C$5),$F$3:$F$5/ROUNDUP(($C$3:$C$5-$B$3:$B$5),0)))/24
 
Upvote 0
Yeah this works! Had to delete the /24 at the end though. Thanks a bunch :). Never even thought of using roundup, I was trying all other kinds of weird and wonderful formulas, unfortunately they didn't work haha.
 
Upvote 0
Excellent! Ah no worries, wasn't sure if the 120:00 was just formatting or actually the value in hours - I assumed the latter. Yeah the half-day incident caught me out at first too! Glad I could help :)
 
Upvote 0
So I've come across an issue with the formula. If the start or finish times is anything other than midnight once the duration is more than 1 day the formula doesn't work. I've workout out a couple ways to make it work for a single entries but as soon as I try turn it into an array it completely fails. I used a nested IF function with a bunch of parameters which worked but as soon as the array hit a square with nothing in it the formula would come back as =0.
 
Upvote 0
Oh yeah fair point... because the list of days in the summary are all at 00:00. I've also done some nested IF functions in the formula below, which works with arrays... not sure about your issue with blank squares in it though? Can you paste an example of this issue?

Same deal as last time... "Start" column located in B2 and Control+Shift+Enter

=1-SUM(IF((INT(B8)>=INT($B$3:$B$5))*(B8<=$C$3:$C$5),IF(B8=INT($C$3:$C$5),$C$3:$C$5-B8,IF(B8=INT($B$3:$B$5),1-($B$3:$B$5-B8),1))))*$E$3:$E$5

StartFinishDurationWeightingImpact
1/08/2018 0:002/08/2018 12:0036:00:0010%3:36
1/08/2018 12:004/08/2018 0:0060:00:0010%6:00
7/08/2018 6:008/08/2018 12:0030:00:0010%3:00
DayTotal ImpactAvailability
1/08/20186:0085%
2/08/20184:4885%
3/08/20182:2490%
4/08/20182:24100%
5/08/20182:24100%
6/08/20180:00100%
7/08/201821:3692.5%
8/08/201819:1295%
9/08/201816:48100%

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Sorry, ignore the values in the "Total impact" column - forgot to put a proper formula in there.
 
Upvote 0

Forum statistics

Threads
1,214,904
Messages
6,122,169
Members
449,070
Latest member
webster33

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top