if cell a is true change cell b value

Hi All!


In Numbers I would like a formula that [simplified] if cell C1 is not blank then cell C2 changes to a given text string of "No". C1 will contain text


So very crudely in cell C1 i had =IF (C1="", "", C2="No")

But this doesn't work.


Seem to only be able to find information on ways to do this in excel using VBA!


Any suggestions would be greatly appreciated.

Posted on Aug 16, 2014 11:01 AM

Reply
5 replies

Aug 16, 2014 7:07 PM in response to illuminoscopist

illuminoscopist wrote:


Hi All!


In Numbers I would like a formula that [simplified] if cell C1 is not blank then cell C2 changes to a given text string of "No". C1 will contain text


So very crudely in cell C1 i had =IF (C1="", "", C2="No")

But this doesn't work.


Seem to only be able to find information on ways to do this in excel using VBA!


Any suggestions would be greatly appreciated.


Illumin,


If you have correctly stated what you did, the cause of your troubles is simple. You can't write an equation in Cell C1 that takes an action that depends on the content of cell C1 (itself). A cell can contain either data or an expression, but not both. For a cell to act on it's own content would be a case of recursion, which is not permitted in spreadsheet programming because it would lock-up the processor in a loop.


Rewriting your statement such that it will do what you want:


So very crudely in cell C2 i had =IF(C1="", "", "No")


Give that a try,


Jerry

Sep 1, 2014 7:20 AM in response to illuminoscopist

Here is what you wrote:

Formula in C3

=IF(C1="","",C2="No")


the problem is you are misunderstanding the way formulas work in spreadsheet applications. You may assign a value to the cell the formula is in only (NOT other cells).


so the places in your formula where you try to assign another cell Numbers (and most other spreadsheet programs) interprets as a boolean test. So C2="No" is testing whether C2 contains the text string "No".


you will need a formula in cells C2 and Cell C3


C2=if(C1="", "", "<NOT SURE WHAT YOU WANT WHEN FALSE>")

C3=if(C1="", "<WHATEVER WHEN TRUE>", "<WHATEVER WHEN FALSE>")


you should replace the strings below with what ever you want.:

<NOT SURE WHAT YOU WANT WHEN FALSE>

<WHATEVER WHEN TRUE>

<WHATEVER WHEN FALSE>

Sep 1, 2014 7:26 AM in response to illuminoscopist

Hi illuminoscopist,

Here is a variation on your first formula:

=IF(ISBLANK(C1),"","no")


This formula will return "no" if either C1 or C2 is blank:

=IF(OR(ISBLANK(C1),ISBLANK(C2)),"","no")


This will return "no" if both are blank

=IF(AND(ISBLANK(C1),ISBLANK(C2)),"","no")


These formulas can go anywhere but the cells they refer to (C1 and C2)


quinn


And a question for the big boys- Is there a reason to avoid the ISBLANK function if you are looking at a data entry cell and not a formula?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

if cell a is true change cell b value

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.