Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John Harris
 
Posts: n/a
Default Finding Time difference

I know this has to be easy. I have a start time and an end time. I need the
difference in hours and minutes. I used the examples in the help, but it
converts it to text and then it won't add. Anyone?

TIA

JC



  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

A1: <start time
B1: <end time

C1: =B1-A1

format C1 as time.

XL stores times as fractional days (e.g., 3:00 = 0.125), so if your
times span midnight, the "later" time will be smaller than the "earlier"
time. Compensate that by adding 1 to the "end time". You can take
advantage of XL's automatic coercion of boolean TRUE/FALSE values to 1/0:

=(B1<A1) + B1 - A1

or the more obscure, but equivalent:

=MOD(B1-A1, 1)

In article ,
"John Harris" wrote:

I know this has to be easy. I have a start time and an end time. I need the
difference in hours and minutes. I used the examples in the help, but it
converts it to text and then it won't add. Anyone?

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

One more version that might be even more clear:

=B1-A1+IF(B1<A1,1,0)

Still following JE's rules:
A1: <start time
B1: <end time



John Harris wrote:

I know this has to be easy. I have a start time and an end time. I need the
difference in hours and minutes. I used the examples in the help, but it
converts it to text and then it won't add. Anyone?

TIA

JC


--

Dave Peterson
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
Calculate time difference to the half hour Ken Ivins Excel Worksheet Functions 6 July 17th 05 05:48 PM
Time zone Time difference mac_see Excel Worksheet Functions 0 May 3rd 05 07:57 PM
calculate difference in time to hours Chris Excel Worksheet Functions 5 January 18th 05 06:07 PM
calculate negative or positve difference in time kpmoore Excel Discussion (Misc queries) 2 January 5th 05 01:35 AM
Time / Formula to look at time difference carl Excel Worksheet Functions 5 November 8th 04 06:59 PM


All times are GMT +1. The time now is 08:32 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"