Nuxurious
Nuxurious

Reputation: 111

Negative & Positive sum

I'm pulling activity data from Oura ring into a Google Sheet. I'm pulling Target kilometers (in 0.0) en Actual KM (in 0.0) then format them in an output sheet to meters (0.000).

The problem is that if I beat my Target kilometers (say 10.0), with for example 3 kilometers, then it will say -3 instead of 13 kilometers. However, if I don' beat it, it will just say i.e. 7.

Is there a way, like a formula, that can do like =IFnegative, count target KM + actual KM so it says 13 in the Output sheet?

Upvotes: 2

Views: 83

Answers (1)

player0
player0

Reputation: 1

try:

=IF(A1>0, A1+B1, (A1*-1)+B1)

also you can use ABS function

Upvotes: 1

Related Questions