Hello,
I am trying to figure out a way to find the closest number to another number. Here is what my spreadsheet looks like:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Row[/TD]
[TD]time stamp[/TD]
[TD]event #[/TD]
[TD]unit[/TD]
[TD]unit status[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl63, width: 77"]1420089320[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1[/TD]
[TD]e[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420089448[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1[/TD]
[TD]e[/TD]
[TD]arrive[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1420089500[/TD]
[TD]1[/TD]
[TD]e[/TD]
[TD]available[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420089653[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090098[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]arrive[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090377[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090400[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090412[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]available[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am trying to find the average time between all instances of arrive-hold and arrive-available for each unit (average time on hold for each unit for each event). For example, I would want to calculate the difference between row 3 and 4, and row 5 (because it is the first hold instance) and 7. Sometimes units have multiple/varying amounts of hold time stamps before they are marked arrive (as in rows 5 and 6). So the formula would have to look for the first hold time stamp, then look for the next closest arrive or available time stamp AND make sure the unit and event number match.
My timestamps are in epoch seconds. I am using Excel 2010 64-bit.
Thank you!!
I am trying to figure out a way to find the closest number to another number. Here is what my spreadsheet looks like:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Row[/TD]
[TD]time stamp[/TD]
[TD]event #[/TD]
[TD]unit[/TD]
[TD]unit status[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl63, width: 77"]1420089320[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1[/TD]
[TD]e[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420089448[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1[/TD]
[TD]e[/TD]
[TD]arrive[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1420089500[/TD]
[TD]1[/TD]
[TD]e[/TD]
[TD]available[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420089653[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090098[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]arrive[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090377[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090400[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]hold[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][TABLE="width: 77"]
<tbody>[TR]
[TD="class: xl65, width: 77"]1420090412[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2[/TD]
[TD]m[/TD]
[TD]available[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am trying to find the average time between all instances of arrive-hold and arrive-available for each unit (average time on hold for each unit for each event). For example, I would want to calculate the difference between row 3 and 4, and row 5 (because it is the first hold instance) and 7. Sometimes units have multiple/varying amounts of hold time stamps before they are marked arrive (as in rows 5 and 6). So the formula would have to look for the first hold time stamp, then look for the next closest arrive or available time stamp AND make sure the unit and event number match.
My timestamps are in epoch seconds. I am using Excel 2010 64-bit.
Thank you!!