I'm trying to figure out if there is a more efficient way of calculating the max number of trailers in an area based on arrival and departure. Example below is how i'm currently determining.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Supplier[/TD]
[TD]Arrival Date & Time[/TD]
[TD]Departure Date & Time[/TD]
[TD]Trailer[/TD]
[TD]4/19/18 01:00:00[/TD]
[TD]4/19/18 02:00:00[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ASD[/TD]
[TD]4/20/18 0:01:12[/TD]
[TD]4/20/18 16:34:33[/TD]
[TD]A234[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]ASD[/TD]
[TD]4/20/18 11:00:52[/TD]
[TD]4/20/18 16:00:00[/TD]
[TD]A235[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BFB[/TD]
[TD]4/19/18 01:05:34[/TD]
[TD]4/22/18 03:05:56[/TD]
[TD]B545[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]CCC[/TD]
[TD]4/19/18 05:06:35[/TD]
[TD]4/20/18 03:20:36[/TD]
[TD]C555[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]BFB[/TD]
[TD]4/18/18 00:30:15[/TD]
[TD]4/22/18 03:56:45[/TD]
[TD]B546[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]MAX#[/TD]
[TD][/TD]
[TD]TOTAL[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
In example above I have data of when trailer arrives and departs. I'm using rows E through AA... were I have date with time in hour increments and using using an If formula in cells below those rows =If(E$1>=$B2,if(E$2<=$C2,1,0),0) then summing each column to determine the max peak of trailers in area at that time. Then I have =max(E7:AA...7) were it returns the max trailers.
I would really like to get away from using hourly increments, as Max is not truly accurate, but if I use minutes spread sheet would be more massive than it already is. If possible I would like to input a formula that determines the max so I can get away from adding in the incremental times.
Any considerations and help will be much appreciated.
Thanks
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Supplier[/TD]
[TD]Arrival Date & Time[/TD]
[TD]Departure Date & Time[/TD]
[TD]Trailer[/TD]
[TD]4/19/18 01:00:00[/TD]
[TD]4/19/18 02:00:00[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ASD[/TD]
[TD]4/20/18 0:01:12[/TD]
[TD]4/20/18 16:34:33[/TD]
[TD]A234[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]ASD[/TD]
[TD]4/20/18 11:00:52[/TD]
[TD]4/20/18 16:00:00[/TD]
[TD]A235[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BFB[/TD]
[TD]4/19/18 01:05:34[/TD]
[TD]4/22/18 03:05:56[/TD]
[TD]B545[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]CCC[/TD]
[TD]4/19/18 05:06:35[/TD]
[TD]4/20/18 03:20:36[/TD]
[TD]C555[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]BFB[/TD]
[TD]4/18/18 00:30:15[/TD]
[TD]4/22/18 03:56:45[/TD]
[TD]B546[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]MAX#[/TD]
[TD][/TD]
[TD]TOTAL[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
In example above I have data of when trailer arrives and departs. I'm using rows E through AA... were I have date with time in hour increments and using using an If formula in cells below those rows =If(E$1>=$B2,if(E$2<=$C2,1,0),0) then summing each column to determine the max peak of trailers in area at that time. Then I have =max(E7:AA...7) were it returns the max trailers.
I would really like to get away from using hourly increments, as Max is not truly accurate, but if I use minutes spread sheet would be more massive than it already is. If possible I would like to input a formula that determines the max so I can get away from adding in the incremental times.
Any considerations and help will be much appreciated.
Thanks