Can IF function produce a blank cell?

  • Thread starter Thread starter agbiggs
  • Start date Start date
A

agbiggs

I'm using the IF function to create a column of data which will be
charted. If the IF criterion isn't satisfied, I'd like it to output a
blank cell, rather than a zero or some other number, so it won't be
charted. Is there any way to do this? Thanks,

Andrew
 
Hi

You could use a space or #N/A in your formula:

=IF(A2<0," ",A2)
=IF(A2<0,"#N/A",A2)

They both seem to work for me.

Andy
 
People must have had a heavy weekend.
Niek's =IF(YourCondition,YourValue,=NA()) should read
=IF(YourCondition,YourValue,NA())
and Andy's =IF(A2<0,"#N/A",A2) should be =IF(A2<0,#N/A,A2)

I thought I was the only one prone to typos!
best wishes
 
Also be advised that =IF(A2<0,"",A2) in B1 will give a value of FALSE if you
then use =ISBLANK(B1). This is because a formula is not a blank even when
the cell looks blank.
 
Thanks, Bernard.

I "always" test a formula.
The very few occasions that I don't usually get me on the right track again!
 

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

Back
Top