JMO9966
asked on
VB.Net is there a function to return the difference between two values?
I need to compare a zero or greater value to a value that may be negative and return the difference between the two values as a positive number these variables are all stored as data type Double.
For example:
Value 1 = 17
Value 2 = -4
Would like function to return 21.
Thanks,
Jon
For example:
Value 1 = 17
Value 2 = -4
Would like function to return 21.
Thanks,
Jon
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If FutureBalance < OrderPoint And FutureBalance < 0 Then
FutureSuggOrder = Math.Abs(FutureBalance) + OrderPoint
ElseIf FutureBalance < OrderPoint And FutureBalance >= 0 Then
FutureSuggOrder = OrderPoint - FutureBalance
Else
FutureSuggOrder = 0
End If