Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a very old excel spreadsheet that I must write data to from an Access
database. I have been able to load in the data into Excel thru VB using a variant matrix. I have vefied that the amounts retain the correct number of decimals. It then goes thru all of the data and copies the relevant data to the relevant sheet. However when i view the data on the excel sheet, it gets truncated/rounded to 2 decimals. Even when i change the field to 3 decimals, it shows 12.440 instead of 12.435. With rs2 Do While Not .EOF Actmatrix(i, 1) = Trim(![Account_Number]) Actmatrix(i, 8) = ![comsn] <= Comsn = -12.435 i = i + 1 rs2.MoveNext Loop End With ***** later in the code Workbooks("x2006" & mth & ".xls").Sheets("ExportNLs").Range("L" & n) = Actmatrix(i, 8) <= on the relevant field, number is -12.44 comsn = Actmatrix(i, 8) <= comsn is -12.435 .... Workbooks("x2006" & mth & ".xls").Sheets("CIS " & tmpAcct).Range(strColumn & "12") = comsn <= on relevant field, number is -12.44 I have heard on Value2, but I don't think I can use it here, and "Precision as Displayed" has no effect. Can you help? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I insert a variable amount of blank spaces in a formula? | Excel Worksheet Functions | |||
Convert $ amount from excel to access? No decimals but 00 at end | Excel Worksheet Functions | |||
Conditional formatting : amount of decimals | Excel Discussion (Misc queries) | |||
Format monetary amount to 9 digits with No decimals without rounding | Excel Worksheet Functions | |||
Capturing Decimal Values in Variable - Losing decimals when summin | Excel Programming |