Auto add or subtract between two cells [Closed]

Report
-
 Blocked Profile -
Hello,



This is probably a very simple question. I am trying to auto add or subtract between two cells. example: if B1 is greater or less than A1 it will either auto add or subtract C1

1 reply


OK, there is a function called =IF.

It goes something like this:
=IF(logic_test,true,false)

You can nest IF's like so:
=IF(logic_test1,if(logic_test2,logic_test2_true_result,logic_test2_false_result),logic_test1_false_result)

So, with that being said, we can do:
=IF(B1>A1,B1-C1,B1+C1)

The above example checks to compare B1 and A1. If A1 is less than B1, then C1 is Subtracted from B1, and if it isn't, it adds it!

Use the above example to write our own!

Have fun!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!