Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Alex
 
Posts: n/a
Default 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   Report Post  
Niek Otten
 
Posts: n/a
Default

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" wrote in message
...
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
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
Excel 2002 Add-in: Open Database Connectivity available for Excel Nick B Excel Discussion (Misc queries) 8 December 7th 06 06:04 PM
Stop Excel Rounding Dates leinad512 Excel Discussion (Misc queries) 1 April 20th 05 04:19 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
Excel error - Startup (and Acrobat PDFMaker) gxdata Setting up and Configuration of Excel 0 February 4th 05 03:44 AM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


All times are GMT +1. The time now is 10:30 PM.

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

About Us

"It's about Microsoft Excel"