Home |
Search |
Today's Posts |
#19
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Large Excel file size caused by a bug ? I really tried everything | Excel Discussion (Misc queries) | |||
Excel Caused Error in VBE6.dll. Excel will Close | New Users to Excel | |||
EXCEL caused an invalid page fault | Excel Discussion (Misc queries) |