IF-if the arguement is false don't return anything

R

Rae

Hi all,
I am trying to use the IF functionsuch that if say C3=M4 then retur
NA, if not don't return anything in the cell. What can I do? Any hel
will be greatly appreciated. Thank you!
Ra
 
J

JE McGimpsey

One way:

=IF(C3=M4,"NA","")

This doesn't really return nothing, it returns a null string (""). But
it will *appear* blank.
 
A

Alan

Rae > said:
I am trying to use the IF functionsuch that if say C3=M4 then return
NA, if not don't return anything in the cell. What can I do? Any
help will be greatly appreciated. Thank you!
Rae

Hi Rae,

You could use this:

IF(C3=M4,NA(),"")

However, note that an empty string ("") is NOT the same as nothing.

It is one of my few enduring gripes with Excel that Microsoft has
never provided the ability to return a null value (not zero, not an
empty string, but nothing).

If they did, we could use something like this:

IF(C3=M4,NA(),Null())

Unfortuately, that is not an option at this time (as far as I know),
and in any case, (almost?) always you can work around it with the
above approach..

HTH,

Alan.
 
R

Rae

Hi all,
So what if I don't only want it to "appear" blank? What if I want i
to be blank so that I can type other things inside? Thank you!

Rgds,
Ra
 
B

Biff

Hi Rae!

You can't!

A cell can only contain one of two things, a formula that
returns a value (which is what you have) or a constant.
You can have one or the other but not both.

Biff
 
R

Rae

Hi Biff,
Icic, so Excel's is not that intelligent after all. That's quite
limitation. Anyway, thanks folks!

Rgds,
Ra
 
S

SidBord

It seems to me that you might be able to make use of "event
processing" to solve this problem. You'll have to do some
studying. The idea is to write an event macro that senses
when you write something into the cell. When that happens
the event macro examines the contents and writes N/A in one
case, or clears the cell in the other. That way you
wouldn't have a formula stored in the cell.
 
P

pboost1

One thing that you can try to do is have the false statement display 0
then condition format to have the cell display the 0 as white (o
background color of the cell)
 
Top