use IF to return a truly blank cell

C

cwinters

I often use if statements to return empty cells, for example:

=IF(a1=0,"ERROR","")

The trailing "" returns an empty cell. The problem is, it is not TRULY
empty. If I fill that formula down, I cannot, for example, jump from
one "ERROR" cell to the next by hitting Ctrl arrow-down because it
seems to think that these empty cells have contents.

Is there a way to designate, in such a formula as above, to return a
TRULY empty cell?

Thanks
 
D

Dave Peterson

Nope.

If you don't need the formula, you could use this:

=if(a1=0,"Error","deletethis")
Drag down the column
convert to values (edit|copy, edit|paste special|Values)

Then edit|replace
what: deletethis
with: (leave blank)
replace all.
 
S

swatsp0p

If you think logically, the cell is NOT empty, (truely or otherwise) a
it contains a formula. What you are really doing is forcing the cel
to not display its contents with IF(.....,"").

AFAIK, there is no way to make a cell with a formula act as if i
doesn't exist.

One option to explore is to use Find. Highlight the column you want t
search. Click CTRL+F. In the "Find What", enter the Error (#N/A, #VALUE
etc.). Then click on Options to search "By Columns" and set Look In to
Values.

Not too bad, especially if you have a very long column to loo
through.

HTH

Bruc
 
C

cwinters

Yes but... I forgot to mention a key step I do. After running this I
formula I always copy and paste special the cells as values. So th
formulas no longer exist. The "" is turned into nothingness that i
not, truly, nothingness. The Find technique is great if you want t
find and replace something within a given cell, but I want to find an
merely TAG something (in an adjacent cell; hence using the formula
 
G

Guest

Use an event macro.

If cell A1 changes and is zero then set the result cell to "ERROR"
if cell A1 changes and is not zero then set the result cell to ""
 
D

Dave Peterson

After you convert to values, you can see that those "empty" cells aren't really
empty.

Tools|Options|Transition tab|check Transition navigation keys
(remember to toggle it off later!)

Now look at the formula bar for one of those empty cells--you'll see a single
quote.

I usually use a formula like:

=if(a1=0,"ok",na())

convert to values and then do that Edit|replace on the #n/a! string.

(Kind of the same response as the deletethis message, huh?)
 

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