all,
I am getting circular reference error while using this formula...please suggest if anyone has way to resolve it...
thx in advance...
A2 =IF(A1="buy",(B1+A2),A2)
putting above formula in cell A2..
all,
I am getting circular reference error while using this formula...please suggest if anyone has way to resolve it...
thx in advance...
A2 =IF(A1="buy",(B1+A2),A2)
putting above formula in cell A2..
yep !dont put it in a2 thats what a circular ref is you are refering to the cell the formula is in
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
A circular reference is when you reference the cell with the formula within the formula itself. In your case, you're referencing cell A2 in a formula stored in A2. This can be useful if you're trying to use iterations to increase a cell's value, but usually it's not necessary.
Can this function be stored in a different cell, say A3? If not, you would probably need to use a macro to update the value of A2 based on the value of A1 (in the Worksheet_Change event, perhaps).
You could of typed into anyother cell =IF(A1="buy",(B1+A2),A2) leaving out the "A2" before the "if".
Regards
Peter
No need for a new post, as the original intent was a worksheet function. The following code should be placed in the sheet module for the sheet on which you want it to run (right click on that sheet tab and choose View Code):
Hope that helps!Please Login or Register to view this content.
Send a copy of the sheet if you like , remember no personal details.
Regards
Peter
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks