The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
Ok. I'm Building a timecard and I'm having a brain fart.
I've got two fields One for Start Time and one for End time. Both are Formatted HH:MM AM/PM I want to write a function to add up the hours worked and I can't seem to make it work. It needs to work across midnight as we often work 12+ hour shifts overnight. I know theres an easy way to do this as I've done it before but I can't seem to get it to go.
Roland of Gilead on
0
Posts
SerpentSometimes Vancouver, BC, sometimes Brisbane, QLDRegistered Userregular
edited December 2006
subtract, multiply by 24, use the 'number' format for the result, not 'date'.
edit: you'll also want to put the 'day' in the field, not just hour.
Serpent on
0
Blake TDo you have enemies then?Good. That means you’ve stood up for something, sometime in your life.Registered Userregular
Posts
edit: you'll also want to put the 'day' in the field, not just hour.
IF(A<B,B-A,Midnight-A+B)
Satans..... hints.....
Could you elaborate on this a bit?
=IF(HOUR(C3)-HOUR(B3)<0, 24 + HOUR(C3)-HOUR(B3), HOUR(C3)-HOUR(B3))
Change the cell references to match, obviously.