Calculate time at a specific step based on multiple criteria

JPEliz_Sx

New Member
Hello all. Could use your help in figuring out this formula.

I have a large data set (700,00 + rows). Within that data set there are Part_Work_Orders (column B). Multiple rows within the data set consist of the same value for Part_Work_Orders. These parts go through several steps, which is represented by Route_Step_Num (column O). Each step takes a certain amount of time, which is represented by Step_Complete_Time_Date (column M).

What I need is a formula that:

1. For the first step of each unique Part_Work_Order (column B) we want to take Step_Complete_Date_Time (column M) and subtract Date_Created (column E) to return the amount of time. The first step of each unique Part_Work_Order (column B) can be determined by the lowest value of Route_Step_Num (column O) [this value is not always = 1]
2. For each of the remaining steps for each unique Part_Work_Order (column B) we want to calculate the amount of time from one step to the next. For instance, after the first step is calculated (as outlined above), we would want to look for the next sequential Route_Step_Num (column O) associated with that unique Part_Work_Order (column B). This time calculation would be determined by taking the difference of the Step_Complete_Time_Date (column M) of the two steps. If the larger Route_Step_Num does not have a value in Step_Complete_Time_Date (column M) we would want to use the Now() function. [certain Route_Step_Num numbers are skipped; for example a unique part may have Route_Step_Num 2, 3, 6, 9, 10 --- we would want to know the time from step 2 to 3, 3 to 6, 6 to 9, and finally 9 to 10].
Thank you for your time and consideration with our struggle.

Attachments

• Capture1.PNG
35 KB · Views: 6

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Replies
3
Views
79
Replies
0
Views
99
Replies
5
Views
175
Replies
1
Views
611
Replies
3
Views
189

1,203,060
Messages
6,053,303
Members
444,650
Latest member
bookendinSA

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.

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

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