ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Do nothing if False! (https://www.excelbanter.com/excel-worksheet-functions/191613-do-nothing-if-false.html)

Simi Singh

Do nothing if False!
 
I have been trying to use the IF statement without else.
I just want If and then...
is there any way I can implement that?

ExcelBanter AI

Answer: Do nothing if False!
 
Yes, you can use the IF statement without an else clause. In this case, if the condition is true, the formula will return the result you specify, and if the condition is false, the formula will return nothing.

Here's an example of how to use the IF statement without an else clause:
  1. =IF(A110,"Yes","")

In this example, if the value in cell A1 is greater than 10, the formula will return "Yes". If the value in cell A1 is less than or equal to 10, the formula will return nothing.

To implement this in your own spreadsheet, simply replace "A110" with your own condition, and replace "Yes" with the result you want to return if the condition is true. If you don't want to return anything if the condition is false, just leave the second argument of the IF statement blank, like this: "".

Mike H

Do nothing if False!
 
Maybe

=IF(A1=1,"Thats True","")

Mike

"Simi Singh" wrote:

I have been trying to use the IF statement without else.
I just want If and then...
is there any way I can implement that?


Dave

Do nothing if False!
 
Hi,
Post an example of what you want to achieve.
What do you want to happen if the condition isn't met?
Dave.

Jennifer B

Do nothing if False!
 
I have the same question, I think. I want the statement for cell b2 to be (in
words), "If cell a2 equals cell a1, then copy data from cell b1 to b2, if
not, leave cell b2 alone." I do not want it to return "false" or "0" or
anything. I want it to leave what is in that cell alone. Any ideas? Thanks
in advance.

"Simi Singh" wrote:

I have been trying to use the IF statement without else.
I just want If and then...
is there any way I can implement that?


Dave Peterson

Do nothing if False!
 
Excel doesn't work like this.

You can get an empty string ("") that makes the cell look empty--and that's the
closest you can get.

Jennifer B wrote:

I have the same question, I think. I want the statement for cell b2 to be (in
words), "If cell a2 equals cell a1, then copy data from cell b1 to b2, if
not, leave cell b2 alone." I do not want it to return "false" or "0" or
anything. I want it to leave what is in that cell alone. Any ideas? Thanks
in advance.

"Simi Singh" wrote:

I have been trying to use the IF statement without else.
I just want If and then...
is there any way I can implement that?


--

Dave Peterson

Gord Dibben

Do nothing if False!
 
Further to Dave's reply..............

Formulas cannot "copy" from one cell to another.

They can only return data to the cell in which it is written

In your case it would be written in B2 as so

=IF(A2=A1,B1,"")

which is back to If, then, else

Without the else...............=IF(A2=A1,B1) which would return FALSE if A2<A1


Gord Dibben MS Excel MVP

On Thu, 17 Jul 2008 13:45:00 -0700, Jennifer B <Jennifer
wrote:

I have the same question, I think. I want the statement for cell b2 to be (in
words), "If cell a2 equals cell a1, then copy data from cell b1 to b2, if
not, leave cell b2 alone." I do not want it to return "false" or "0" or
anything. I want it to leave what is in that cell alone. Any ideas? Thanks
in advance.

"Simi Singh" wrote:

I have been trying to use the IF statement without else.
I just want If and then...
is there any way I can implement that?



Dave

Do nothing if False!
 
Hi,
"if not, leave cell b2 alone."
If this means leave cell B2 blank, try this in B2:
=IF(A2=A1,B1,"")
Regards - Dave.

"Jennifer B" wrote:

I have the same question, I think. I want the statement for cell b2 to be (in
words), "If cell a2 equals cell a1, then copy data from cell b1 to b2, if
not, leave cell b2 alone." I do not want it to return "false" or "0" or
anything. I want it to leave what is in that cell alone. Any ideas? Thanks
in advance.

"Simi Singh" wrote:

I have been trying to use the IF statement without else.
I just want If and then...
is there any way I can implement that?


Jennifer B[_2_]

Do nothing if False!
 
That's what I suspected. Seemed like a circular problem. Oh well, thanks.

"Dave" wrote:

Hi,
"if not, leave cell b2 alone."
If this means leave cell B2 blank, try this in B2:
=IF(A2=A1,B1,"")
Regards - Dave.

"Jennifer B" wrote:

I have the same question, I think. I want the statement for cell b2 to be (in
words), "If cell a2 equals cell a1, then copy data from cell b1 to b2, if
not, leave cell b2 alone." I do not want it to return "false" or "0" or
anything. I want it to leave what is in that cell alone. Any ideas? Thanks
in advance.

"Simi Singh" wrote:

I have been trying to use the IF statement without else.
I just want If and then...
is there any way I can implement that?



All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com