Adding and Subtracting Time

  • Thread starter Thread starter TrentA
  • Start date Start date
T

TrentA

I G22 and H22 I have the following:

8:00 am 9:05 am

In cell I 22 I have the following formulal:

=IF(H22="","",(H22-G22)*24)

This gives me an answer off 1.08

I logged in a total of 1 hour and five minutes, so I don't understand
the 1.08

Am I doing things right? Is there a way to show hours and minutes?

Thanks
 
By multiplying by 24 you are converting the time into a number ie 1 hour and
8/100th of an hour (8/100*60=4.8)

Leave the time as it is and format the cell as time:

=IF(H22="","",(H22-G22))


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
TrentA said:
I G22 and H22 I have the following:

8:00 am 9:05 am

In cell I 22 I have the following formulal:

=IF(H22="","",(H22-G22)*24)

This gives me an answer off 1.08

I logged in a total of 1 hour and five minutes, so I don't understand
the 1.08

Am I doing things right? Is there a way to show hours and minutes?

Thanks

If you don't want decimal representation of your time, try this:

First of all, in I22 all you really need to enter is simply

=H22-G22

Secondly, custom format I22 as [h]:mm
 
Back
Top