Share via

Formula for subtracting and adding postive/negative numbers

Anonymous
2012-09-23T15:42:30+00:00

Hi,

Can anyone let me know the best formula for subtracting and adding positive/negative numbers. Basically I want the formula to subtract everytime there's a negative number (i.e -2) and add everytime the value is positive (i.e 2). I know this seems easy, but the tricky part here is that the cell the result depends on identifies the value as positive or negative. Anyways, can anyone help, I can't figure out the best way to automate this.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2012-09-23T16:02:54+00:00

    Just use a addition, =A1+B1.If B1 < 0, the formula is the same as A1-B1. If B>=0, the formula is the same as A1+B1.  Or am I missing something?

    70+ people found this answer helpful.
    0 comments No comments

12 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-08-07T09:13:17+00:00

    What if

    A1=0

    A2=-3

    Because i am getting the return value as 3.

    Please help me.

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-10-09T21:32:16+00:00

    Adding a negative number is the same as subtracting the absolute value of that number.  A1-B1 when B1 is negative is the same as A1+ABS(B1) where ABS(B1) is the postive value of B1. ABS, or Absolute Value returns the positive value of any positive or negative number.  This is basic arithmetic from grammar school.

    Can you provide some sample values and the result you want when adding or subtracting them?

    10 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2012-10-09T21:14:09+00:00

    When I put in 2 numbers and try to subtract the negative number, it adds them together. I do not know in advance if the number will be positive or negative. I just want to put in the numbers and have them subtract.  Can't seem to do this.

    Does anyone know what I'm doing wrong?

    9 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2012-09-23T15:59:30+00:00

    Put a bunch of numbers in A1:A8 - make some of them negative. In B1  enter =SUM(A1:A8)

    If this does not answer your question please explain more. best wishes

    6 people found this answer helpful.
    0 comments No comments