Can I change the precision of Excel calculations

C

Chris

I am having a problem with calculations with MS Excel of
Office XP while using it with Visual Basic (VB). I am
using VB to create user-defined functions. MS Excel for
Office XP uses 15 decimal places of precision when it
performs automatic calculations. VB uses a higher level
of precision (at least 20 decimal places; I don't know
the maximum). How can I change the MS Excel setting to
perform calculations with more than 15 decimal digits of
precision? Is there an update/add-in that I can install?
 
J

Jerry Park

Chris said:
I am having a problem with calculations with MS Excel of
Office XP while using it with Visual Basic (VB). I am
using VB to create user-defined functions. MS Excel for
Office XP uses 15 decimal places of precision when it
performs automatic calculations. VB uses a higher level
of precision (at least 20 decimal places; I don't know
the maximum). How can I change the MS Excel setting to
perform calculations with more than 15 decimal digits of
precision? Is there an update/add-in that I can install?
Yesterday, someone posted this link (sorry, forgot who):
http://precisioncalc.com/
 
G

Greg Lovern

Hi Chris,

Excel will give you up to about 322 decimal places, but only 15
*significant digits*. Significant digits is the *count of digits* from
the *left-most non-zero digit* to the *right-most non-zero digit*.
That series of 15 digits can be anywhere relative to the decimal
point.

My add-in, xlPrecision, gives you up to 32,767 signficant digits, and
up to 32,765 decimal places. You can download the free edition of
xlPrecision from:

http://www.PrecisionCalc.com

You can use xlPrecision from your VB code. Here's an example:

===========================================
Dim Oxlp As Object
Dim strRet as String
Set Oxlp = CreateObject("xlPrecision.cls_xlPrecision")
strRet = Oxlp.xlpDIVIDE(67,89,,,,50)
Debug.Print strRet
Set Oxlp = Nothing
===========================================

As a developer, you can freely distribute the free edition of
xlPrecision to your users.


Hope this helps,

Greg Lovern
http://PrecisionCalc.com
Get Your Numbers Right
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top