John Baird
Coatesville, Pennsylvania, United States
General information
Category:
Coding, syntax & commands
Title:
Mathmeticians, Please help!
I have an application that currently uses the following formula for calculating the margin on an item sold:
lnMargin = ROUND((1-(tnCost/tnPrice)) * 100,1)
The problem is that we have customers entering tncost > tnPrice to create a negative margin/loss leader situation. In this case, the returns from the function are huge and cause an overflow.
Can someone tell me or show me a formula that will calculate negative margins correctly?
Thanks..
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only