In Excel, if you want to check a cell if its value is 0 (zero) and you want a formula to return a blank in the result, you can use the IF function. In IF, you need to specify the cell from which you want to check the 0 and then specify the blank values you want to get in the result once the condition is TRUE. In the following example, we have a list of numbers in column A, and you must write a condition.
Here’s the formula to check if a cell has a zero value and change it to a zero.
=IF(A2=0,"",A2)
Now, let’s try to understand how this formula works.
This formula works in three parts; in the first part where we have a condition that checks if the cell has a value) or not.
IF – We have used the IF function to write a conditional formula.
A2=0 This is the condition where we compare the value in cell A2 with 0. This is the part where we will get the condition’s result as TRUE or FALSE. If the condition is TRUE (that means the value in the cell is 0), and if the condition is FALSE (that means the value in the cell is not zero).
“”,A2 – These are the two returning values which the formula returns, when conditions is met or doesn’t met.