|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Urgent Help Needed Converting Excel Formula to ASP
it just isn't calculating properly.
the formula from Excel is: (1.25%/12,360,((B1+3000+(B1*2%))*-1)) B1 = user input from an online form I have tried: (.0125 / 12 * 360 * ((B1+3000+(B1*.02))*-1)) Also have broken the formula out: fraction = B1 * .02 factor = (.0125 / 12) *360 total = B1 + 3000 + fraction * -1 year1 = total * factor assuming the user inputs "100,000" for B1, the proper total should be $349.91 instead i come up with $378.75 is it the negative 1 that is causing problems? i am so frustrated |
|
#2
|
||||
|
||||
|
Um, I don't get 349.91 with excel using the equation you posted. (after changing the commas for *, since the commas don't work...) I get -39375.
And the formula broken out as you have will come up with 378.75. So basically, I don't see how you were planing to come up with that value. Double check the formula you posted for excel. also, why multiply "fraction" by -1? Just subtract "fraction". Shouldn't make a difference, but its smoother. Double check and let me know |
|
#3
|
|||
|
|||
|
yeah, i don't need the "-1"
that was an excel thing to post a positive result. let me explain.
this formula is for what is called a "Graduated Payment Mortgage". if you run the formula in Excel, and input 100,000 for the mortgage balance, you come up with 349.91 as the monthly payment for each month in the first year (this is the correct result). the formula is broken down this way: mortgage balance * 2% mortgage balance + $3,000 (points) + (above result) 1.25% (minimum payment rate) / 12 months * 360 months (for a 30 year loan) * NEWMortgage Balance (calculated in first 2 steps) forget about the "*-1) for now. so, my question is, why does the Excel formula (=PMT) function come up with a 349.91 result (which is the correct result) when the non-Excel formula using the same input come out to 378.75? is is an Order of Operations issue? so sorry if this is confusing but my brain is whacko with this. Last edited by matcom : October 26th, 2003 at 12:03 PM. |
|
#4
|
||||
|
||||
|
Why do you think 349.91 is the correct value? The PMT function in excel calculates a constant payment over the entire life of the loan, the graduated payment mortgage increases with time. http://216.239.39.104/search?q=cach...&hl=en&ie=UTF-8
has some info including how to set it up in excel. As it stands now, the answer you're getting for the other sheet is correct for how it is set up, but I don't know that you have set it up correctly, not being an accountant ![]()
__________________
--Dave-- U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM= |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Urgent Help Needed Converting Excel Formula to ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|