time sheet am / pm
"Jeff" wrote...
....
I can not figure out the formating to put in and then be able to get the
right ending total. If i formate the cell as time (h:mm) the i have to type
in 8:05 and then that does not seem to work for pm because when I type 4:30
it thinks it is am, so I guess that you need to know military time?
No, you need to enter hour, colon, minute, then AM or PM.
If you only have day shifts, so start time is always between midnight
and noon and end time is always between noon and midnight, then add
0.5 to the second column (end time) values in other formulas. So if
start time were in col B, end time in col C and total time in col D,
the total time for the record in row 3 would be given by the formula
=C3+0.5-B3
However, if there could be ANY exceptions to this, e.g., ending time
also before noon, beginning time after noon, swing shifts or graveyard
shifts, then you MUST enter AM/PM as appropriate. Computers can't deal
with ambiguity, so humans have to be explicit and complete sometimes.
Is there a simple way to just be able to type 8.05 4.30 and it knows the
first column is AM and the second column is PM and then the toal column is
also in time? When I tried putting it in all as number or text when I got
to the grand total it did not know it was time so went off based on 100 and
not 60 minutes.
As is perfectly reasonable for Excel. If you want to use h.mm
notation, it's entirely up to YOU to handle transitions properly.
Using the same sample cell addresses as above, total time (time
elapsed between start time and end time) would be given by the formula
=TIME(INT(C4),100*MOD(C4,1),0)+0.5-TIME(INT(B4),100*MOD(B4,1),0)
HOWEVER, as noted above, if you EVER have to handle start and end
times on the SAME side of noon, then YOU AND YOUR USERS would need to
enter AM or PM or times using 24 hour clock notation (military time).
Further complicating matters would be swing or graveyard shifts on
either side of midnight. As long as no one would ever work more than
23 hours 59 minutes at a time AND you and your users enter either AM/
PM with 12 hour clock times or enter 24 hour clock military times, you
could calculate time worked as
=MOD(C3-B3,1)
|