Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mp mp is offline
external usenet poster
 
Posts: 70
Default subtract times


How to get time difference in hours and fractions of hours?

example 3 columns in a spread sheet
Col A and B formated as "Time"
Col C formatted as Custom "h:mm" produces result 0:20 in example below
how to format so as to produce result 0.3333?
I tried formatting as "h" but it then produces 0
formatting as 0.00 produces 0.01 - no clue how it comes up with that one?

Col A Col B Col C
Start Time End Time Elapsed
2:50 PM 3:10 PM = B-A

thanks
mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 905
Default subtract times

"mp" wrote:
How to get time difference in hours and fractions of hours?

[....]
Col A Col B Col C
Start Time End Time Elapsed
2:50 PM 3:10 PM = B-A


=(B2-A2)*24

formatted as Number with some number of decimal places.

Time and dates are stored as days and fraction of days.


----- original message -----

"mp" wrote in message
...

How to get time difference in hours and fractions of hours?

example 3 columns in a spread sheet
Col A and B formated as "Time"
Col C formatted as Custom "h:mm" produces result 0:20 in example below
how to format so as to produce result 0.3333?
I tried formatting as "h" but it then produces 0
formatting as 0.00 produces 0.01 - no clue how it comes up with that one?

Col A Col B Col C
Start Time End Time Elapsed
2:50 PM 3:10 PM = B-A

thanks
mark


  #3   Report Post  
Posted to microsoft.public.excel.programming
mp mp is offline
external usenet poster
 
Posts: 70
Default subtract times


"Joe User" <joeu2004 wrote in message
...
"mp" wrote:
How to get time difference in hours and fractions of hours?

[....]
Col A Col B Col C
Start Time End Time Elapsed
2:50 PM 3:10 PM = B-A


=(B2-A2)*24

formatted as Number with some number of decimal places.

Time and dates are stored as days and fraction of days.


Thanks much! that works
mark


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default subtract times

Hi Mark

Use this formula:

=MINUTE(B1-A1)/60

and format the cell as general.

Note: This formula will only work when B-A <=60

Hopes this helps.
....
Per

On 2 Apr., 00:41, "mp" wrote:
How to get time difference in hours and fractions of hours?

example 3 columns in a spread sheet
Col A and B formated as "Time"
Col C formatted as Custom "h:mm" produces result 0:20 in example below
how to format so as to produce result 0.3333?
I tried formatting as "h" but it then produces 0
formatting as 0.00 produces 0.01 - no clue how it comes up with that one?

Col A * * * * * * * *Col B * * * * * *Col C
Start Time * * * *End Time * * * *Elapsed
2:50 PM * * * * * 3:10 PM * * * *= B-A

thanks
mark


  #5   Report Post  
Posted to microsoft.public.excel.programming
mp mp is offline
external usenet poster
 
Posts: 70
Default subtract times

Thanks Per
Joe's also worked and should work for any amt, not just <60

"Per Jessen" wrote in message
...
Hi Mark

Use this formula:

=MINUTE(B1-A1)/60

and format the cell as general.

Note: This formula will only work when B-A <=60

Hopes this helps.
....
Per

On 2 Apr., 00:41, "mp" wrote:
How to get time difference in hours and fractions of hours?

example 3 columns in a spread sheet
Col A and B formated as "Time"
Col C formatted as Custom "h:mm" produces result 0:20 in example below
how to format so as to produce result 0.3333?
I tried formatting as "h" but it then produces 0
formatting as 0.00 produces 0.01 - no clue how it comes up with that one?

Col A Col B Col C
Start Time End Time Elapsed
2:50 PM 3:10 PM = B-A

thanks
mark





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
Subtract times? Terry Pinnell[_2_] Excel Discussion (Misc queries) 2 February 2nd 12 07:46 AM
subtract times with a negative result vdmbqb Excel Discussion (Misc queries) 1 March 10th 10 01:31 AM
How to subtract[difference] in TIMES?? Crackles McFarly Excel Worksheet Functions 9 August 21st 07 11:36 PM
How can I subtract and enter times in my charts? Warrior Charts and Charting in Excel 4 December 11th 06 03:10 AM
excel should allow to add and subtract times LV Excel Worksheet Functions 10 December 10th 04 11:45 PM


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

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

About Us

"It's about Microsoft Excel"