+ Reply to Thread
Results 1 to 2 of 2

Loss of caluclating precision (VBA vs Excel)

Hybrid View

Guest Loss of caluclating precision... 10-13-2005, 10:05 AM
Guest Re: Loss of caluclating... 10-13-2005, 11:05 AM
  1. #1
    Alex
    Guest

    Loss of caluclating precision (VBA vs Excel)

    Hello

    I performed a calcualtion in an excel worksheet using the built in formula
    PMT=.

    If I then do that same procedure using VBA (i.e. write a sub to calculate
    PMT with the same inputs and still using PMT in VBA) I get two separate
    results?

    Can anybody help align my VBA result to the spreadsheet result.

    As I understand it, excel treats anything in a spreadsheet as a 'Double' - I
    defined my variables in VBA as Double but still got a different answer.

    Does anybody have any insights? FWIW, I am simply calcualting loan
    repayments...

    Regards


    Alex

  2. #2
    Niek Otten
    Guest

    Re: Loss of caluclating precision (VBA vs Excel)

    Hi Alex,

    Did you also declare the function itself as Double?

    Why not post your code, the values and the results from both methods?

    --
    Kind regards,

    Niek Otten

    "Alex" <Alex@discussions.microsoft.com> wrote in message
    news:136A7168-13AF-400F-8E60-23FDD6012C46@microsoft.com...
    > Hello
    >
    > I performed a calcualtion in an excel worksheet using the built in formula
    > PMT=.
    >
    > If I then do that same procedure using VBA (i.e. write a sub to calculate
    > PMT with the same inputs and still using PMT in VBA) I get two separate
    > results?
    >
    > Can anybody help align my VBA result to the spreadsheet result.
    >
    > As I understand it, excel treats anything in a spreadsheet as a 'Double' -
    > I
    > defined my variables in VBA as Double but still got a different answer.
    >
    > Does anybody have any insights? FWIW, I am simply calcualting loan
    > repayments...
    >
    > Regards
    >
    >
    > Alex




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1