

If the return cell in an Excel formula is empty, Excel by default returns 0 instead. For example cell A1 is blank and linked to by another cell. But what if you want to show the exact return value – for empty cells as well as 0 as return values? This article introduces three different options for dealing with empty return values.
Contents
Hide zero numbers in Excel within the worksheet settings
Probably the easiest option is to just not display 0 values. You could differentiate if you want to hide all zeroes from the entire worksheet or just from selected cells.
There are three methods of hiding zero values.
For details about all three methods of just hiding zeroes, please refer to this article.
Unlike the first option, the second option changes the output value. No matter if the return value is 0 (zero) or originally a blank cell, the output of the formula is an empty cell. You can achieve this using the IF formula.
Structure of the IF formula for changing zeroes to empty values.
Say, your lookup formula looks like this: =VLOOKUP(A3,C:D,2,FALSE) (hereafter referred to by “original formula”). You want to prevent getting a zero even if the return value―found by the VLOOKUP formula in column D―is an empty value. This can be achieved using the IF formula.
The structure of such IF formula is shown in the image above (if you need assistance with the IF formula, please refer to this article). The original formula is wrapped within the IF formula. The first argument compares if the original formula returns 0. If yes―and that’s the task of the second argument―the formula returns nothing through the double quotation marks. If the orgininal formula within the first argument doesn’t return zero, the last argument returns the real value. This is achieved by the original formula again.
The complete formula looks like this.
=IF(VLOOKUP(A3,C:D,2,FALSE)=0,””,VLOOKUP(A3,C:D,2,FALSE))
Structure of the IF formula for returning an empty cell if the return value is also an empty cell.
The previous option two didn’t differentiate between 0 and empty cells in the return cell. If you only want to show empty cells if the return cell found by your lookup formula is empty (and not if the return value really is 0) then you have to slightly alter the formula from option 2 before.
Like before, the IF formula is wrapped around the original formula. But instead of testing if the return value is 0, it tests within the first argument if the return value is blank. This is done by the double quotation marks. The rest of the formula is the as before: With the second argument you define that—if the value from the original formula is blank—the return value is empty too. If not, the last argument defines that you return the desired non-blank value.
The formula in your example from option 2 looks like this.
=IF(VLOOKUP(A3,C:D,2,FALSE)=””,””,VLOOKUP(A3,C:D,2,FALSE))
'Professor Excel Tools': Add more than 60 amazing features to Excel!
Professor's Error Helper for Excel: Solve any error in Excel.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Comments 14
Stuart
Hi Henri can you help me with what is I’m sure a simple problem.
I have text in column A which is one of 4 options. In a related row I have times. I want a function to find the longest time in each text option. An example would be:
A 01:30
B O2:20
A. 02:05
C. 01:31
Etc
Can you help?
Stuart
Dom
Options 2 and 3 are seriously ugly solutions. By far the most elegant approach is to concatenate a null string to the lookup result, thus forcing the result to a string:
=””&VLOOKUP(A3,C:D,2,FALSE)
Ali
Option 3: Show zeroes but don’t show empty return values
sir this formula not working,
show zeros but a same time show the empty return values. please fix this problem
Topher
How is Option 3 any different from just using the original formula?
Henrik Schiffner
If the value in your original formula is blank, the original formula would (without the if-formula according to number 3) return 0. Using option 3 changes it to blank again.
You can easily try it by just using a cell reference, for example writing =B1 in cell A1. If you leave B1 blank, A1 would show 0. Using the option 3 would show a blank cell A1.
jay klein
greetings
I have a sumif formula applied to a column that has blanks in it, and in some cases may have ALL blanks. I need to know that when I see a zero it is a ZERO, not a blank being displayed as a zero. I have tried everything.
mll
@Dom: your trick is great, as long as we only need to prevent zeroes to display.
but if I need to do for example
=VLOOKUP(A3,C:D,2,FALSE)<1
cases where VLOOKUP(A3,C:D,2,FALSE) = “” will display TRUE instead of the desired blank value
If we do
=””&VLOOKUP(A3,C:D,2,FALSE)<1, it will always display FALSE whatever the case.
So finally we have no choice but to revert to the – ugly, I concur – suggestion of the article, which is
=IF(VLOOKUP(A3,C:D,2,FALSE)=””;””;VLOOKUP(A3,C:D,2,FALSE)<1)
Noel
Thanks for this. Option 3 works great for my database.
Erik
Wouldn´t ORIGINAL FORMULA&”” work as well?
That displays the cell as empty if the value is 0
Hi, I am using a simple if statement =IF(G2="L",1, ) and I dont want 0 as a false value. I am fine to get a blank cell when False. Please help.
Hi, I am using a simple if statement =IF(G2=”L”,1, ) and I dont want 0 as a false value. I am fine to get a blank cell when False. Please help.
Tommy
For option 3, Microsoft suggests that you use ISBLANK() function instead of = “”
https://docs.microsoft.com/en-us/office/troubleshoot/excel/use-formula-evaluate-blank-cell
Vester
Option 2 worked for me. It’s so simple and useful. Thank you so much!!
Rishie
Hi Henrik!
I have been using something like this: =If( [condition] , [result if true] , “”)
This formula gives me blanks in case the condition is false and works good for me as it ‘shows’ cells as blanks. But in reality it has some special character which gets copied when I need to. How can I get rid of these special characters in the cell as I will need to keep it like this. Can we use any other option to make it ‘actual’ blank?
Thanks
Mohit
Damir
I have the same problem.
When the “” result cell value is copied to another workbook as value it is not empty.
The cell shows as populated and messes up calculations, for example the average of that column is #Value!
It would be better to use some letter instead of “” as it would not interfere down the line.