Time

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

Guest

How can I subtract two cells that have a 12-hour time format and return a
value of toal hours within this range in decimal form such as 8.3 hours?
 
You simply have to subtract the tow numbers =A1-B1. but there are two caveots

1) the resulting cell has to be formated as a number not as time. the
reusults is not a serial time number in excel
2) the difference is a fraction of a day where 1 equals 24 hours. To get
hours simply multiply by 24.

example
11:00 - 3:00 = .333333 (8 / 24)

24 * .3333333 = 24 * 8/24 = 8.0
 
Times are stored as fractional days, so the display format doesn't
matter in calculations. That also means to convert times to integer
hours, multiply by 24.

One way:

=ROUND(MOD(B1-A1,1)*24,1)
 
Back
Top