Title: excel - IF statement: how to leave cell blank if condition is false ("" does not work) - Stack Overflow
Headings: IF statement: how to leave cell blank if condition is false (“” does not work)
IF statement: how to leave cell blank if condition is false (“” does not work)
15 Answers
15
edit
Not the answer you're looking for? Browse other questions tagged excel if-statement excel-2010 worksheet-function or ask your own question.

Content: 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,
excel if-statement excel-2010 worksheet-function
Share
edited Nov 13 '15 at 14:27
Vegard
3,379 2
2 gold badges
17
17 silver badges
37
37 bronze badges
asked Sep 12 '13 at 15:09
Mayou
Mayou
7,618 15
15 gold badges
51
51 silver badges
91
91 bronze badges
4
Add a comment
|
15 Answers
15
Active Oldest Votes
45
Try this instead
=IF (ISBLANK (C1),TRUE, (TRIM (C1)=""))
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. edit
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. =IF (ISBLANK (C1),TRUE, (TRIM (C1)="deleteme"))
Share
edited May 23 '17 at 11:47
Community ♦
1 1
1 silver badge
answered Sep 12 '13 at 15:12
Automate This
Automate This
28.3k 11
11 gold badges
54
54 silver badges
78
78 bronze badges
3
Add a comment
|
69
Unfortunately, there is no formula way to result in a truly blank cell, "" is the best formulas can offer. I dislike ISBLANK because it will not see cells that only have "" as blanks. Instead I prefer COUNTBLANK, which will count "" as blank, so basically =COUNTBLANK (C1)>0 means that C1 is blank or has "". If you need to remove blank cells in a column, I would recommend filtering on the column for blanks, then selecting the resulting cells and pressing Del. After which you can remove the filter.