Reputation: 13
Probably a really easy solution.
I'm working with a sheet that has a simple division of two numbers to return the difference as a percentage. In this case: =O12/K12
Now if O12 and K12 are empty the cell returns a value of 0.00%. How can I change the formula so it just stays blank if there is no data in O12 and K12 please?
Any help would be amazing!
Thanks Ryan
Upvotes: 1
Views: 138
Reputation: 86
This happens because the empty string in a math formula is parsed to zero. To avoid this, you could check if both are numbers before:
=IF(AND(ISNUMBER(O12),ISNUMBER(K12)),O12/K12,)
What it means: if O12 and K12 are numbers, calculate the division. If not, return an empty string (blank).
Upvotes: 1