Equality with zero in Excel -
I'm using a spreadsheet, some probability for cell is getting empty, the number is zero or, having one Having a non zero number, or a string.
If I want to test that the cell is zero but not empty, then I currently
= IF (AND (B2 = 0, LEN (B2) & Gt;
The function you are looking for is an ISBLANK () function.
= IF (and (ISBLANK (A1) = FALSE, A1 = 0), "foo", "bar")
Edit:
Forgive Please, I recite your question again. You are forced to use two conditions because you are checking the two conditions. If you want to use a condition for any reason, then the way I can think is to remove a situation that you are looking for in a method and then call it.
= IF (CheckCellIsOK (A1), "foo", "bar")
The method still examines both conditions but you actually Are hidden in that fact.
Comments
Post a Comment