| View previous topic :: View next topic |
| Author |
Message |
FallenAvatar General User

Joined: 19 Apr 2012 Posts: 9
|
Posted: Thu Apr 19, 2012 2:28 pm Post subject: [SOLVED]Possible to do nothing in an IF statement? |
|
|
Is it possible to make a formula where if certain conditions are true then do this, if conditions are not met do nothing. Using the method of "" or 0 will not work because the field will already have data in it and I do not want the current data to change.
Example: Four Columns.
A: Contains check boxes linked to cell. Default False
B: Contains a number anywhere from 0 to 20 default set at 0
C: If A is False, C = B. If A is True retain former value.
D. If A is True, D= B - C, else 0
I have everything working except the bold part and I have been searching for days for a way to do this without any success. Any ideas?
So that way the user had formerly entered 3 in B with A being false so C was 3 and D was 0.
Then they later check A setting it to true and change B to 5. So C should still show 3 and D should now show 2.
Last edited by FallenAvatar on Fri Apr 20, 2012 11:26 pm; edited 1 time in total |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Thu Apr 19, 2012 5:31 pm Post subject: |
|
|
You say you have data in C so you must want to put your formula in another cell but a formula in one cell cannot affect the value of another cell.
Last edited by JohnV on Sat Apr 21, 2012 7:19 am; edited 1 time in total |
|
| Back to top |
|
 |
FallenAvatar General User

Joined: 19 Apr 2012 Posts: 9
|
Posted: Thu Apr 19, 2012 7:22 pm Post subject: |
|
|
The info from cell C comes from the formula.
I know my formula is messed up because it returns "FALSE" where I want it to do nothing.
The field A has a check box linked to cell A which is set to False at start. It is set to True based on formula on other parts of the form and once true will stay true. The user can not change it directly, it changes based on formula. This works Correctly.
Field B has no formula and is for the user to enter numbers Between 0 and 20. It is straight user input and works directly.
Field C has a formula in it that displays form B IF cell A is set to false, I want it to stay on the number it was at when A becomes TRUE and not change anymore. It works up until A is set to TRUE at which point the number disappears and the formula returns FALSE.
Field D has a formula that if A is false output a 0, if true it outputs B - C. This works correctly if I manually enter a number into C, if I leave the formula in C it returns an error because C is showing FALSE.
-----------------------------------------------------------------------------------------
It is for a point buy system and under certain conditions the "cost" is lower for the points. So it needs to keep track of the total points in B, points before the check in C, and points after check in D.
My formula that works up until the check is as follows.
=IF((A=FALSE) AND (B<>0);B)
If The check box is unchecked still and the user changes the number it works fine, but when the box is checked it shows FALSE. On another site I received suggestions of adding ;"" at the end...which wipes the field to empty. I need it to stay the number it was when the box is checked. |
|
| Back to top |
|
 |
FallenAvatar General User

Joined: 19 Apr 2012 Posts: 9
|
Posted: Fri Apr 20, 2012 11:29 pm Post subject: |
|
|
A user from another forum came up with the solution. Thanks for those that took the time to look this over and give it some thought.
The solution was to turn Iterations on....in tools->Options->Calc->Calculate |
|
| Back to top |
|
 |
|