convverting time 2:30 to 2.5

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I convert times such as 2:30 to 2.5 hour
I am trying to calculte the number of hours between time in and time ou
Example time in 12:00 - time out 14:30 = 2:30 and I want it to say 2.5 so I can calculate total hour
 
Hi sna!

=(B1-A1)*24
Format General

Time is recorded by Excel as a decimal part of a day which is why you
multiply by 24 to get hours in a number format.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
There's no need to convert. Leave the format as is and
then sum your hours. The cell that contains the sum
formula will most likely have to be formatted as [h]:mm if
the sum is greater than 24.

That being say, if you want to convert your final number
from say, 32:30 (32 hrs, 30 min.) to 32.5 hrs:

=TEXT(A1,"[h]")+(CEILING(A1,1/24)-A1)/(1/24)

HTH
Jason
Atlanta, GA

-----Original Message-----
How do I convert times such as 2:30 to 2.5 hours
I am trying to calculte the number of hours between time in and time out
Example time in 12:00 - time out 14:30 = 2:30 and I want
it to say 2.5 so I can calculate total hours
 
How do I convert times such as 2:30 to 2.5 hours
I am trying to calculte the number of hours between time in and time out
Example time in 12:00 - time out 14:30 = 2:30 and I want it to say 2.5 so I can calculate total hours

With 14:30 in A2 and 12:00 in A1, use =24*(A2-A1).
 
Would there be an easy reverse formula, inputting hours in the easier format of 2.5 for 2:30 and 7.75 for 7:45, and converting the 2.5 and 7.75 to 2:30 and 7:45?
 
Hi Carla!

Try:
=A1/24
Format hh:mm

Or:

Put 24 in a cell
Copy
Select these decimal hours
Edit > Paste Special > Divide > OK

This second version permanent changes your data but if that's what you
want it avoids the step of having to create a helper formula.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top