#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Time

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Time

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

"Troy2006" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Time

Try this:

=MOD(B1-A1,1)*24

Format as GENERAL or NUMBER

--
Biff
Microsoft Excel MVP


"Troy2006" wrote in message
...
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?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Time

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)

In article ,
Troy2006 wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting date/time serial values to cumulative time totals... Kevin B Excel Discussion (Misc queries) 4 October 18th 07 05:05 PM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
Formula to find Stop Time from Start Time and Total Minutes Jonathan Bickett Excel Worksheet Functions 5 March 7th 07 05:22 PM
template or formula for start time -finish time -total hours ple cc New Users to Excel 1 March 27th 06 06:06 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM


All times are GMT +1. The time now is 12:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"