#1   Report Post  
Posted to microsoft.public.excel.misc
sedonovan
 
Posts: n/a
Default time question

i need to find the difference in two times - displayed as a decimal - eg 1700
- 1830 = 1.5

so far my formula is:

=IF(A2<"",TEXT(sheet1!K2)-(sheet1!J2)"h:mm","")

where am i going wrong?

cheers
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default time question

Try:
=(TIME(LEFT(K2,2),RIGHT(K2,2),0)-TIME(LEFT(J2,2),RIGHT(J2,2),0))*24

Cheers,
--
AP

"sedonovan" a écrit dans le message de
news: ...
i need to find the difference in two times - displayed as a decimal - eg
1700
- 1830 = 1.5

so far my formula is:

=IF(A2<"",TEXT(sheet1!K2)-(sheet1!J2)"h:mm","")

where am i going wrong?

cheers



  #3   Report Post  
Posted to microsoft.public.excel.misc
RudeRam
 
Posts: n/a
Default time question


Here is one formula I use to get time duration:

=IF(OR(F2="",G2=""),"",(G2-F2+(G2<F2))*24)

Just change the cell references to your sheet

Ensure you have your cells as numbers or time not text

Rick


--
RudeRam


------------------------------------------------------------------------
RudeRam's Profile: http://www.excelforum.com/member.php...fo&userid=8818
View this thread: http://www.excelforum.com/showthread...hreadid=555600

  #4   Report Post  
Posted to microsoft.public.excel.misc
sedonovan
 
Posts: n/a
Default time question

I've tried this and get -0.13

=IF(A2<"",(((TIME(LEFT(sheet1!K2,2),RIGHT(sheet1! K2,2),0)-TIME(LEFT(sheet1!J2,2),RIGHT(sheet1!J2,2),0))*24)) ,""




"Ardus Petus" wrote:

Try:
=(TIME(LEFT(K2,2),RIGHT(K2,2),0)-TIME(LEFT(J2,2),RIGHT(J2,2),0))*24

Cheers,
--
AP

"sedonovan" a écrit dans le message de
news: ...
i need to find the difference in two times - displayed as a decimal - eg
1700
- 1830 = 1.5

so far my formula is:

=IF(A2<"",TEXT(sheet1!K2)-(sheet1!J2)"h:mm","")

where am i going wrong?

cheers




  #5   Report Post  
Posted to microsoft.public.excel.misc
Dav
 
Posts: n/a
Default time question


I would agree with AP's response. if your original times are number or
text. If however they are times eg 18:00 just subtract one value from
the other, multiply by 24 and format as a number

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=555599



  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default time question

I put 1830 in A2 and 1700 in A1:

And this formula in A3:
=(TEXT(A2,"00\:00")-TEXT(A1,"00\:00"))*24

And I formatted A3 as General.

sedonovan wrote:

i need to find the difference in two times - displayed as a decimal - eg 1700
- 1830 = 1.5

so far my formula is:

=IF(A2<"",TEXT(sheet1!K2)-(sheet1!J2)"h:mm","")

where am i going wrong?

cheers


--

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
Elapsed time question Johnfli Excel Discussion (Misc queries) 5 March 2nd 06 05:19 PM
Excel Time Manipulation BFiedler Excel Discussion (Misc queries) 0 September 15th 05 01:15 AM
conditional formatting with time values Access Idiot Excel Discussion (Misc queries) 2 September 13th 05 03:29 PM
Time Question...is this possible? mileslit Excel Discussion (Misc queries) 1 September 8th 05 01:36 AM
rounding time question lbfries Excel Worksheet Functions 3 April 6th 05 08:23 PM


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

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"