IF statement: how to leave cell blank if condition is false ("" does not work)


I would like to write an IF statement, where the cell is left blank if the condition is FALSE. Note that, if the following formula is entered in C1 (for which the condition is false) for example:


and if C1 is tested for being blank or not using =ISBLANK(C1), this would return FALSE, even if C1 seems to be blank. This means that the =IF(A1=1,B1,"") formula does not technically leave the cells blank if the condition is not met.

Any thoughts as to a way of achieving that? Thanks,

11/13/2015 2:27:58 PM

Accepted Answer

Try this instead


This will return true for cells that are either truly blank, or contain nothing but white space.

See this post for a few other options.


To reflect the comments and what you ended up doing: Instead of evaluating to "" enter another value such as 'deleteme' and then search for 'deleteme' instead of blanks.

5/23/2017 11:47:06 AM

I wanted to add that there is another possibility - to use the function na().

e.g. =if(a2 = 5,"good",na());

This will fill the cell with #N/A and if you chart the column, the data won't be graphed. I know it isn't "blank" as such, but it's another possibility if you have blank strings in your data and "" is a valid option.

Also, count(a:a) will not count cells which have been set to n/a by doing this.


If you want to use a phenomenical (with a formula in it) blank cell to make an arithmetic/mathematical operation, all you have to do is use this formula:


assuming C1 is a "blank" cell


You could try this.

=IF(A1=1,B1,TRIM(" "))

If you put this formula in cell C1, then you could test if this cell is blank in another cells


You should see TRUE. I've tried on Microsoft Excel 2013. Hope this helps.


I've found this workaround seems to do the trick:

Modify your original formula:


Then select the column, search and replace "filler" with nothing. The cells you want to be blank/empty are actually empty and if you test with "ISBLANK" it will return TRUE. Not the most elegant, but it's quick and it works.


The easiest solution is to use conditional formatting if the IF Statement comes back false to change the font of the results cell to whatever color background is. Yes, technically the cell isn't blank, but you won't be able to see it's contents.