Share via

Excel formula for subtracting a number only if it is negative

Anonymous
2021-07-12T16:17:05+00:00

Let's say I am calculating for profit/loss

If I get a negative number in a cell I then want to add that negative number to the next year as I still have to account for that money I am behind, but if the number is positive, I don't want to add that number to the next year. What can I write in Cell for second year to only add the number from previous year if the former year is a negative number not positive?

Thank you.

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

2 answers

Sort by: Most helpful
  1. Anonymous
    2021-07-12T18:32:34+00:00

    Hi,

    Use something like:

    =IF(A2<0,A2,0)

    With A2 the cell containing the negative number.

    Thank you JP.

    Okay, one more issue. If the cell is not negative, how can I put the total from a different cell instead.

    For instance, to update the value of C3, If the cell A2 is negative (A2<0) I will add the value to say B2, but if it is positive, I just want to show the value for B2 in C3.

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-07-12T16:52:54+00:00

    Hi,

    Use something like:

    =IF(A2<0,A2,0)

    With A2 the cell containing the negative number.

    1 person found this answer helpful.
    0 comments No comments