subtracting negative numbers

  • Thread starter Thread starter CK
  • Start date Start date
C

CK

I just started working with access and having issue with calculating a total.
For example in a query I am attempting to calculate the results of Column A
- Column B but the resulting (Result) is not what I was expecting (Expected).
Can someone help me shed light on this. I want to show the variance between
the numbers.

Column A Column B Result Expected
0 -100 100
-100
100 -100 200
0
100 50 150
-50

Is there anyway to at lease get column b to subtract from column a and
report it as the results.... seems like all it does is add it. I have tried
this with currancy (-$1.00) and Integers also.... don't get it.
 
No offense, but I think you need to review the rules of arithmetic!

0 - (-100) does equal 100, 100 - (-100) does equal 200. The last one doesn't
make sense, though: 100 - 50 is 50.
 
Well, 0 - (-100) is indeed 100.

100 - (-100) is 200.


You need to be ADDING the two columns, not subtracting.

Subtracting a NEGATIVE number actually adds it. This is basic math.


Now, your third example does not make sense. You can't have it both ways.
Either enter the values in column B as a positive number, then subtract it
from column A. If the result is A - B, then the third example should result
in 50. You say you expect a result of -50? How? 100-50=50.

Your math is messed up.
 
Subtracting a negative number is the same as adding a positive. Perhaps you
want to simply add them.
 
you know whats good to ask what is the context of the data why are you
subtracting numbers as the others have said it is basic maths
- by - = +
- by + = -
+ by + = +

what is columna and columnb and what are you trying to achieve
 
Back
Top