Donate SIGN UP

Minus Figures

Avatar Image
Ian b | 20:21 Mon 06th Apr 2009 | Technology
12 Answers
I'm working on a small programme to calculate my overdraft. Obviously, all the information is in negatives (minus figures), how can I convert these figures into 'positives?
Gravatar

Answers

1 to 12 of 12rss feed

Best Answer

No best answer has yet been selected by Ian b. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
use the abs ( absolute) function
I too am trying to convert my overdraft into positives!
Sadly there only seems to be one way, perhaps if suggest using absolute to the bank . . .
If Squitty's abs function is not available in your application - square and then square root is one possible method.
. . .or simply subtract from zero.
... or multiply by -1
All the solutions offered will result in changing a negative value to positive (as requested), but be aware that Squitty�s & mine will result in a positive number remaining positive, while the others will result in a negative value.
... and the downside of all figures becoming positive regardless of their original status is that any credit amounts will be indistinguishable from debits and will introduce errors to the calculation.
Question Author
Thanks for that all, I haven't tried anything yet, just got in. I don't understand using the abs, how does that work?
The ABS function returns the magnitude of the value, irrespective of whether it is positive or negative.

ABS(5) = 5

and
ABS(-5) = 5
The above assumes you have excelor something similar with an ABS function. But why not just leave everything as negative?
Question Author
Yes, OK, this is getting a bit complicated. I have it already in negative, as you say, it's just I like to get things as near correct as I can (it's only a bit of a project after all). I'll have a look at it later. Cheers.
Question Author
OK, ABS seems to be the way foreward. I'm going to proceed as follows: insert an extra column which will hold the absolute figures, which can be used for calculating the interest, then the original column will be left negative in the normal way (for viewing). Care will have to be taken when the 'balance' is a positive. But that's another formula!! Thanks

1 to 12 of 12rss feed

Do you know the answer?

Minus Figures

Answer Question >>