Quick Formula Help (Hopefully) Please!

Closed
gtagg - Oct 8, 2008 at 08:42 AM
 CMK08 - Oct 9, 2008 at 04:15 PM
Hello,

Okay, to make it simple, I have two cells: A1 and A2. If A2>0, I want to subtract A1 from A2, (A1-A2). This seems pretty easy, =If(A2>0), A1-A2 , but I have no idea where I am going wrong on this... The error message points to the zero, but I don't know any other way to type it.. Your help is greatly appreciated!!

GT
Related:

3 responses

You need to put the "then" clause inside parenthesis.
=IF(A2>0, (A2-A1))
0
I tried that and it told me that it was a circular calculation. I went in my preferences and changed the iteration settings, but it still tells me that it's false. I guess I cannot input a formula in a cell that will have its value fluctuate. Basically, I have two cells, when cell 2 becomes >0, I want cell 1 to reflect a subtraction of cell 1 from cell 2, while maintaining the value in cell 1. You have A1=10, and then A2=4, I would want A1 to automatically equal 6, whereas A2 still equals 4.

Again, your help is much appreciated!!!
0
Ah! I get it! You cannot do that this way because of the circular reference indeed. I think you will have to write some code to accomplish that. I would create two sheets - one with all the static values and another one with the formulas. The formula would be referencing sheet 2 cells. If those numbers need to be updated frequently, I would perform the calculations via VBA.
0