Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Apologies if this is well known, couldn't find any references to it.
It seems that setting a cell to currency format affects the precision with which the cell's values are passed to VBA. For example: Public Function TestDouble(dDouble As Double) As Double TestDouble = dDouble End Function Then set cells: A1: 0.123456789, formatted as currency, displayed to 15 decimal points. A2: =A1, displayed to 15 decimal points. Precision as displayed shouldn't factor in, but is turned off just to be sure. TestDouble(A1) returns 0.1235 TestDouble(A2) returns 0.123456789 TestDouble(A1*1) returns 0.123456789 (!!) Yikes. Is there any way to turn this "feature" off, so that formatting a cell does not change the precision of calculations based on it? I tried to find documentation for this behavior but didn't have any luck there either. Thanks... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I format one cell so that it affects another cell? | Excel Worksheet Functions | |||
Sort affects formula | New Users to Excel | |||
One workbook affects another | Excel Discussion (Misc queries) | |||
VBA compiled - affects conditional compile? | Excel Programming | |||
Precision displayed does not match precision in cell | Excel Discussion (Misc queries) |