View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Calculate hours worked

Don't multiply by 24, and format as hh:mm perhaps

=(D2-C2-INT(D2-C2))+(B2-A2-INT(B2-A2))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"larry_saudi" wrote in message
...
Greetings!

We are using the 12 hour clock format in our time sheet and were able to
calculate the hours worked, however, we want to display the time 4:00 PM

as
4:00 without the PM with the same calculation result.
A B C D

E
IN OUT IN OUT

HOURS
Larry 7:00 AM 12:00 PM 1:00 PM 4:00 PM 8.0

We use the formula in column E =(D-C-INT(D-C))*24+(B-A-INT(B-A))*24 and
format it as Number with 1 decimal places.

Using the format hh:mm in column A & B we can display the time with out

the
AM/PM as it less than 1:00PM, however beyond 1:00PM
using the same format 1:00PM will become 13:00 which is not the desired

time
display(in print & on screen). Typing just 4:00 will neither give a

correct
answer. Pls advice. We use Excel 2003 version.

Thanks and regards