LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #19   Report Post  
Pete McCosh
 
Posts: n/a
Default

Ian,

not sure if you're still going to be following this thread, but I had the
very same problem a while back. The problem occurs because of the level of
precision with which Excel stores the fractions which represent your times.

If the values you're testing and the interval values are typed in directly
then you're test formulae will work fine, if you use a formula to advance the
interval it will cause errors. The reason for this is that both the start
time and the interval value are being rounded very slightly. As you
repeatedly add the second value, the level of diference increases.

Excel is precise to the 14th decimal place, so as long as the differences
are below this point you're okay, but when they get to this point it causes
the errors you're seeing.

If you want to test this, type 0:00:15 in cell A1, 07:00:00 in A3, then
"=a3+$A$1" copied down to A26. In column B, type the time values in directly,
then in column C put "=A3=B3" to give a boolean comparison.

09:30, 10:15, 10:45 and 11:00 should evaluate FALSE. Now reformat columns A
& B as numbers to 15 decimal places and you should see the last digit in the
FALSE rows is different.

I think Harlan Grove has made some pretty exhaustive posts on the
limitations of double-precision floating point representations of fractions.

Cheers, Pete

 
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
Large Excel file size caused by a bug ? I really tried everything Anik Excel Discussion (Misc queries) 5 March 16th 05 06:19 PM
Excel Caused Error in VBE6.dll. Excel will Close mikeF New Users to Excel 0 March 3rd 05 02:01 PM
EXCEL caused an invalid page fault Parthiban S Excel Discussion (Misc queries) 1 January 16th 05 08:39 PM


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