Finding Overlap Times between two sets of data

Sputnik1961

New Member
Joined
Dec 5, 2017
Messages
3
I have been unable to get anything other than errors up to this point on this problem. All numbers are in hours

I have a set of data (3 columns by about 828 rows) that has the queue start time(D3:D830), work start time(E3:E830), and work completion time(F3:F830). These are the three columns the total number of rows will differ depending on how many parts come through in the given time period.

In a separate list, I have resource downtime [start of the downtime (W2:W10) and end of the downtime(X2:X10) ]. This is a 2 by roughly 8 (dependant on the time period).

I want to compare the two lists and determine if a part was affected by the downtime (e.g. was in the queue for a longer time because the resource was down). The end result is being able to gather metrics on downtime and its effect on total turn around time.

below is a section of the larger array and then the entire smaller array below that. My end result is I want the downtime column (right now showing #VALUE ! to show the amount time that overlaps between the Queue and completion time and anytime in the second table. So I want to first find the row that the times overlap, then determine the amount of overlap. I think the first part is my problem. I think Excel does not like that I am comparing one row to an entire array.

Thank you in advance for any help you can provide!

Queue TimeStart TimeCompletion TimeDowntime

<tbody>
</tbody>
2.2516.00168.64#VALUE !
2.40176.00178.00#VALUE !
41.66178.00180.00#VALUE !
61.03180.00182.00#VALUE !
79.04182.00184.00#VALUE !
79.22184.00186.00#VALUE !
95.10186.00188.00#VALUE !
140.62188.00190.00#VALUE !
140.76190.00192.00#VALUE !
143.43192.00202.00#VALUE !

<tbody>
</tbody>

<tbody>
</tbody>



Start TimeEnd TimeTAT
17.61168.26150.64
1294.621615.49320.87
1690.001773.6783.67
3753.443789.3035.86
4054.434129.2574.82
5469.525476.096.56
5485.965593.34107.38
5693.545719.3825.83

<tbody>
</tbody>
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hello Sputnik1961, welcome to MrExcel, what results do you expect? I got 150.65 in row 3 using this formula

=SUM(TEXT(IF(F3>X$2:X$9,X$2:X$9,F3)-IF(D3>W$2:W$9,D3,W$2:W$9),"0.00;\0")+0)

confirmed with CTRL+SHIFT+ENTER and copied down
 
Upvote 0
You are a God amongst men ... That works perfectly, Thank you!

I was trying another work around and thought I had it but after comparing to the results from what I was doing to your formula I see I was still off.

Do you mind walking me through the formula? I want to truly understand what it is doing.
The If statements part is pretty self-explanatory but I never thought to use the TEXT function and why have the +0 at the end?

Thanks again!
 
Upvote 0
Subtracting one IF from the other gives you the correct overlap time when there is an overlap...... but for all the downtimes where there is no overlap you get negative values, so the TEXT function is just converting the negative values to zeroes, because it also turns the positive values in to text values the +0 is need to convert them back so that they can be summed.

You can do it without the TEXT function but it requires more IFs to filter out the non-overlapping downtime periods
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

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