Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default variable amount truncated regardless of # of decimals

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I insert a variable amount of blank spaces in a formula? Lucy4484 Excel Worksheet Functions 1 January 14th 07 10:36 PM
Convert $ amount from excel to access? No decimals but 00 at end Nicole Excel Worksheet Functions 1 January 4th 06 04:37 PM
Conditional formatting : amount of decimals belgian11 Excel Discussion (Misc queries) 0 December 25th 05 04:47 PM
Format monetary amount to 9 digits with No decimals without rounding [email protected] Excel Worksheet Functions 4 December 20th 05 11:14 PM
Capturing Decimal Values in Variable - Losing decimals when summin Mark Excel Programming 1 September 14th 05 05:26 PM


All times are GMT +1. The time now is 09:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"