LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 204
Default trouble with subtracting elapsed times

I am inputing an elapsed time with the following code and it is working fine,

Time1.Value = WorksheetFunction.Text(Now - Sheets("Timing
Sheet").Range("B6"), "[hh]:mm:ss")

The problem occurs when I go to put the next elapsed time in the adjacent
cell. I have an if statement that checks if the lap time is within 20% of the
teams average.

If Time2.Value - LastLap 1.2 * Range("d" & riderCell.Row) Or Time2.Value
- LastLap < 0.8 * Range("d" & riderCell.Row) Then

When I go through debugger the lastlap time is working fine and is general
format, so when over 24hrs is something like 1.00347222. The time2.value
shows as "24:10:23" which is the actual elapsed time since the start of the
race to when they finish the lap. For some reason the two don't want to work
together.

I tried timevalue(time2.value) but this doesn't work if the elapsed time is
24hrs.


Thanks
 
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 times 24hrs NDBC Excel Programming 12 August 6th 09 11:18 AM
How do I find elapsed time between 2 dates and times? Alistair Excel Worksheet Functions 5 April 13th 07 09:02 PM
Accumulating elapsed times. John Excel Discussion (Misc queries) 3 September 8th 06 03:05 PM
Pivot Table for 3 columns of elapsed times William Elerding Excel Discussion (Misc queries) 0 October 14th 05 06:44 AM
Help with calculating elapsed times and formulas Chip Pearson Excel Programming 0 November 3rd 03 06:01 PM


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