 Status
Not open for further replies.
1 - 7 of 7 Posts

#### McNaughton

·
##### Registered
Joined
·
5 Posts
Discussion Starter · ·
Here is what I am trying to do in Excel 2010:

If cell T9 is Yes then cell X9 will go blank.

Any help would be greatly appreciated.

Thanks #### Ent

·
##### Retired Trusted Advisor
Joined
·
5,465 Posts
The format for the if statement is
=If(Condition, Response if true, Response if false)

I would put this in X9
=If(T9="yes", "", value currently in X9)

#### slurpee55

·
##### Registered
Joined
·
7,837 Posts
The format for the if statement is
=If(Condition, Response if true, Response if false)

I would put this in X9
=If(T9="yes", "", value currently in X9)
The last part of your formula is a circular statement, Ent. You can't have X9 look for the value in X9 and return it.
So the first half is fine, but for the latter you need a different value - "no" - for instance. Or possibly you meant
=IF(T9="yes","",T9) ?

#### Ent

·
##### Retired Trusted Advisor
Joined
·
5,465 Posts
The last part of your formula is a circular statement, Ent. You can't have X9 look for the value in X9 and return it.
So the first half is fine, but for the latter you need a different value - "no" - for instance.
I wouldn't have the reference X9, but the value that is currently in X9.
For example if X9 is normally meant to be set to 7 (when T9 isn't yes), my formula would become
=If(T9="yes", "", 7)
Actually it works for a formula too: if X9 is meant to be set to =A9*4 (when T9 isn't yes), my formula would become
=If(T9="yes", "", A9*4)

As you note the formula =If(T9="yes", "", X9) is very much circular

#### slurpee55

·
##### Registered
Joined
·
7,837 Posts
Ent, you stated
I would put this in X9
=If(T9="yes", "", value currently in X9)
But that makes the value currently in X9 "=If(T9="yes", "", value currently in X9)" - a circular formula. So that formula may not go into X9, period. That is my problem with your statement.

#### Ent

·
##### Retired Trusted Advisor
Joined
·
5,465 Posts
Copying and pasting the value currently in X9 into the formula is different from placing the cell reference "X9" in the formula. I don't see a problem with the former.

Let us say X9 has a value of 7.
The value currently in X9 it is 7
The formula I gave becomes =If(T9="yes", "", 7)
That is not circular.

#### slurpee55

·
##### Registered
Joined
·
7,837 Posts
If you mean X9 currently has, say, 7 in it and you change the formula to read =If(T9="yes", "", 7), then sure, that works.
But generally one writes formulas to change dynamically - it would be better to leave X9 with the value of 7 and in Y9 enter the formula =If(T9="yes", "", X9).

1 - 7 of 7 Posts
Status
Not open for further replies.