Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try to simply divide the numbers. If the result is not exactly 1, then
there is a difference. Udo Maury Markowitz schrieb: We're moving data from an Excel sheet into a table in our DB. We copied the data over in the past, but recently found that it was all cut off at the 4th decimal place. This did not occur in the DB itself as far as I can tell, the fields are set to FLOAT, not MONEY. Anyway I've written a macro to roll over the original data again, find if there's a single matching row in the DB, and if so, update it. As a sanity check I look at the values in the DB just to be sure we have to change something. For instance... if rstTrans!Value = theTotal then... this test always passes, even when the numbers are actually different! For instance, in the first case the number on the left is 1,933.46385, and the one on the right is 1,933.4639 So how do I get VB to properly compare these things? Maury |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
rounding and comparing cells | Excel Discussion (Misc queries) | |||
Avoid duplicate number entry when only start and stop numbers given. | Excel Discussion (Misc queries) | |||
How to Avoid Rounding Errors | Excel Programming | |||
How can I generate random numbers but avoid duplications? | Excel Discussion (Misc queries) | |||
Rounding numbers then doing a sum of those numbers produces incorrect result. | Excel Programming |