ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 24th, 2003, 12:12 PM
matcom matcom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 9 matcom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 26th, 2003, 01:50 AM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 13 m 21 sec
Reputation Power: 76
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

Reply With Quote
  #3  
Old October 26th, 2003, 12:01 PM
matcom matcom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 9 matcom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old October 26th, 2003, 10:29 PM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 13 m 21 sec
Reputation Power: 76
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=

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Urgent Help Needed Converting Excel Formula to ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT