Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I still can't understand anything about this.
When I read the value of a cell in VB, the code returns a value rounded to 4 decimal places. The cell in question has a number that is out to about 8 decimals. And I'm not talking about the assignment, if you simply look at the contents of the cell in the debugger, it's rounded off, ActiveSheet.Cells(i, 9) returns the wrong number! But it's even worse. In order to get the SQL to find the row in the DB I have to round both sides and compare the rounded values. So I have code like... theSql = theSql & " AND ROUND(value, 3) =" & Round(theTotal, 3) The cell in question contains the value 1712.1465. Thus, the Round function on the right side should return 1712.147. Well look what actually happens: AND ROUND(value, 3) =1712.146 What the HECK is going on?!? Maury |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ROUNDING FORMULA =ROUND(B12/$B$10,1) ROUNDING TO HIGH | Excel Worksheet Functions | |||
Rounding time of day up to fall in during work hours | Excel Discussion (Misc queries) | |||
I need a formula with rounding up & rounding down to the nearest . | Excel Worksheet Functions | |||
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? | Excel Programming | |||
Worksheet rounding vs VBA rounding | Excel Programming |