Do nothing if False!

S

Simi Singh

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?
 
D

Dave

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

Jennifer B

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.
 
D

Dave Peterson

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.
 
G

Gord Dibben

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
 
D

Dave

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top