Page 1 of 1

Louis, about that supervisor shift overlapping

PostPosted:Sat Nov 08, 2008 5:25 pm
by SineSwiper
I overheard Shellie talking about that overlapping shift spreadsheet thing you were doing. When I heard you were doing it with true/false statements every 30 minutes, I was thinking that there's got to be a more mathematical way.

Well, I was bored waiting at the haircutting place, so I figured it out. Okay, given any two shifts, the amount of overlap is going to be:

(Earlier end time) minus (Later start time)

So, if you have a shift like these:
Code: Select all
|---------------------|
              |---------------------|
The overlap visually is obvious. Mathematically, it's always going to be the first ending time minus the last starting time. In Excel, where A/B is the start/end times, and 1/2 is the shifts, this would be:

=IF(B1 < B2, B1, B2) - IF(A1 > A2, A1, A2)

In the case of a "tie", 1 or 2 will be the same, so it doesn't matter. The only other thing to consider is if the overlap doesn't exist at all. If that's the case, it will be negative. So, there's a MAX function in Excel. Make it either the formula or zero, whichever is higher.

As far as individual days, I'm not sure, but ultimately, you'll be adding all of those together. You will also need to account for 3rd shifts, but if the dates are complete times and dates, Excel will fix part of the problem for you.

PostPosted:Sat Nov 08, 2008 5:39 pm
by Flip
This could have been handled via PM.

PostPosted:Sat Nov 08, 2008 5:49 pm
by Louis
That is more or less what I was doing, albeit your formula is much more simplistic. Right now I'm just trying to come up with a way to account for schedules that go past midnight. At that point my blood pressure started to rise and I got a migraine because the call center was in a queue and I never came back to it.

Since I don't have anything better to do for the next hour or so I'm going to start toying with it again.

PostPosted:Sat Nov 08, 2008 8:21 pm
by Tessian
That reminds me-- Bovine, I just found out I have the clap, you should get yourself tested

PostPosted:Sat Nov 08, 2008 8:59 pm
by bovine
Tessian wrote:That reminds me-- Bovine, I just found out I have the clap, you should get yourself tested
oh jeeze

PostPosted:Sat Nov 08, 2008 9:01 pm
by Eric
Heya James, those Obshina Mafia dudes we ripped off for $250,000 are looking for us, I don't think they know if they know about this place yet but I think you better watch your back.

PostPosted:Sat Nov 08, 2008 9:16 pm
by Lox
I pooped today and there was corn in it. The scary thing is...I haven't eaten corn in 2 weeks.