Elapsed time, allowing for exclusions
I was set a challenge recently, in which the business requirements kept getting more complex. I rose to the challenge, but the final solution was made more complex by the fact that the requirements were iterative as opposed to being defined upfront.
The requirements evolved such:
- Can you find the difference, in hours, between two times in Excel
- Oh, can you exclude weekends
- Oh, and on the weekdays, can you exclude the times that are out of hours (i.e. before 9am, after 5pm doesn’t count)
Here’s the solution. It works, but because of the way it evolved, I no longer know how it works. So if you have any problems with it, don’t come running to me!
August 31, 2007 | Filed Under Life
Comments
One Response to “Elapsed time, allowing for exclusions”
Leave a Reply
Aha. I recognise this one. If its any consolation here in the business we are quite content to believe that it happens as a result of a complex set of gears and linkages in a black box somewhere. Or perhaps its just magic . . .