Numbers IF formula for additions/subtractions on MacBook Pro
USING NUMBERS ON MAC BOOK PRO NEED AN "IF" FORMULA TO DO THE ADDITIONS AND SUBTRACTIONS. I CAN SEND A SAMPLE OF THE SPREAD SEET.
redsdad
MacBook Pro 16″, macOS 15.6
USING NUMBERS ON MAC BOOK PRO NEED AN "IF" FORMULA TO DO THE ADDITIONS AND SUBTRACTIONS. I CAN SEND A SAMPLE OF THE SPREAD SEET.
redsdad
MacBook Pro 16″, macOS 15.6
There is no "stop" like there is in programming.
This is the exact thing you asked for (other than "stop")
=IFS(AND(F29="",G29=""),"",F29>=0,G29+F29, F29<0, G29-F29)
The result is either a null string "" (which appears as a blank cell) or mathematical result.
However,
if F29>=0 then G29 + F29 else if F29<0 then G29-F29
can be simplified to G29+ABS(F29)
so the simplified answer is
IF(AND(F29="",G29=""),"",G29+ABS(F29))
Note that if F29 or G29 is empty, but the other has a value, the empty cell is treated as a zero. If you meant "if F29 OR G29 is empty then stop", replace the AND with OR.
There is no "stop" like there is in programming.
This is the exact thing you asked for (other than "stop")
=IFS(AND(F29="",G29=""),"",F29>=0,G29+F29, F29<0, G29-F29)
The result is either a null string "" (which appears as a blank cell) or mathematical result.
However,
if F29>=0 then G29 + F29 else if F29<0 then G29-F29
can be simplified to G29+ABS(F29)
so the simplified answer is
IF(AND(F29="",G29=""),"",G29+ABS(F29))
Note that if F29 or G29 is empty, but the other has a value, the empty cell is treated as a zero. If you meant "if F29 OR G29 is empty then stop", replace the AND with OR.
Your question is too vague to get a direct answer.
IF() can certainly trigger additions and subtractions but you'll need to show more.
A sample screenshot of sample data should be sufficient, with an explanation of what you want the formula to do - for example:
"IF the cell B2 is positive, then add C2 and D2, otherwise subtract D2 from C2"
That's just a simple example and they can get far more complex, but knowing what logic you want to implement is key.
So, what is it you're trying to do?
if the cell f29 is empty and g29 is empty then stop. (do not continue) if f29 is positive add it to g29, f29 is negative, subtract from g29.
Numbers IF formula for additions/subtractions on MacBook Pro