Bizzuka IT
asked on
ASP Formula for Excel Function
I need an ASP VB (Not VBA) for this complex Excel formula
=CEILING(((PMT(0.00020845, D5,D3))*(D 5)+(D3))*( 125)*-1,10 0)
=CEILING(((PMT(0.00020845,
@jkaios
Are you going to post a PMT() routine?
http://office.microsoft.com/en-us/excel-help/pmt-HP005209215.aspx
Are you going to post a PMT() routine?
http://office.microsoft.com/en-us/excel-help/pmt-HP005209215.aspx
ASKER
The ceiling function was really the least of the issue I have. The real issue I have is getting an ASP version to match the formula, I tried using the PV() function, but I am not using that version of VB. So if you plug 36000 into the amount and 24 for the term, Excel generates the result of 11800. I tried using this formula but it is no where near the same results
Pmt=LoanAmount*0.00020845/ (1-(1+0.00 020845)^-L oanTerm)
Pmt=Pmt * (LoanTerm+LoanAmount)
Pmt=Pmt * 125*-1
Pmt=LoanAmount*0.00020845/
Pmt=Pmt * (LoanTerm+LoanAmount)
Pmt=Pmt * 125*-1
The PV() function returns the present value, not the payment amount.
Have you tried adding IPmt() and PPmt() function values?
Have you tried adding IPmt() and PPmt() function values?
ASKER
I am using Classic ASP I believe both of these function are VBA, .NET.
They are part of the VB6 language, which should include classic ASP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you're always using a cash balance of 0 and a type of 0 then the function can be simplified:
Function PMT(Rate, nPer, PV)
pmt = (-pv * (1 + rate) ^ nper) * rate / ((1 + rate) ^ nper - 1)
End Function
And you can use your original call:X = CEILING(((PMT(0.00020845,D5,D3))*(D5)+(D3))*(125)*-1,100)
ASKER
Perfect! Thank you
Open in new window