View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Smoakie Smoakie is offline
external usenet poster
 
Posts: 4
Default convert hrs into decimal

i have a spread sheet i use to work out my overtime and i need to get it to
work out the hours and mins in decimals.

For example

I start at 08:30 so any time before this is overtime
I finish at 17:30 so any time over this is overtime ,
I need it to be displayed as 2.25 instead of 02:15:00

a b C D E
f g
1 start finish overtime
08:30 17:30
2 THU 01/03/2007 06:45:00 18:00 02:15:00

I have it so that when the time is entered it works out the overtime ,f1 and
g1 are hidden so the formular is as follows for this

=IF(c2<f1,f1-c2) for the morning and =IF(D2G1,D2-G1) for the afternoon

at the moment this is being worked out using 2 cells out of the working area
to produce E2 02:15:00 by adding the two cells together, I have them all
formatted as time so it will display the right data.

can anyone help or am i doomed to doing it long hand forever.

Smoakie.