Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I've a calculation in Excel VBA and it defaults to giving the result up to 11 decimal places. I need it to be accurate to 16 decimal places. Can this be done and if so how? Here's the calculation: cur_interestPart1 = (cur_balance - cur_offset_amount) * ((int_rate1 / 365) * (int_days_of_interest - int_days_of_interest_hols)) Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Just use instruction : cur_interestPart1.NumberFormat = "#,##0.0000000000000000" HTH |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, thanks but I get an error:
"Compile Error: Invalid Qualifier" The variables had been dimensioned as doubles, so I commented out those lines and now I get: "Object required" Any ideas? Thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi David,
Excel's precision is 15 decimal digits. So if the integer part of the number is 4 places, there's only 11 left for the fraction. Look he http://www.cpearson.com/excel/rounding.htm -- Kind regards, Niek Otten Microsoft MVP - Excel "David" wrote in message ... | Hi | | I've a calculation in Excel VBA and it defaults to giving the result | up to 11 decimal places. I need it to be accurate to 16 decimal | places. Can this be done and if so how? | | Here's the calculation: | | cur_interestPart1 = (cur_balance - cur_offset_amount) * ((int_rate1 / | 365) * (int_days_of_interest - int_days_of_interest_hols)) | | Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Decimal Places | Excel Discussion (Misc queries) | |||
Subtracting two 2-decimal place numbers gives result 13-decimal places? | Excel Worksheet Functions | |||
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. | Excel Discussion (Misc queries) | |||
add 2 decimal places | Excel Discussion (Misc queries) | |||
VBA decimal places | Excel Programming |