ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Telling the difference between zero and blank in IF statement (https://www.excelbanter.com/excel-worksheet-functions/33320-telling-difference-between-zero-blank-if-statement.html)

mindfunk

Telling the difference between zero and blank in IF statement
 
I have an IF statement that needs to chooses the range of cells from which to
perform a calculation based on whether or not a certain cell has a value.
There are times when the value in this cell needs to be Zero. The problem
is, Excel treats 0, "0" as a blank (as in =0, ="0"). It worked when I
turned the cell containing the key value to text, but then another formula
reading this cell doesn't work. Help!

Bob Phillips

=IF(ISBLANK(A1),"",IF(A1=0,"Yes","No"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"mindfunk" wrote in message
...
I have an IF statement that needs to chooses the range of cells from which

to
perform a calculation based on whether or not a certain cell has a value.
There are times when the value in this cell needs to be Zero. The problem
is, Excel treats 0, "0" as a blank (as in =0, ="0"). It worked when I
turned the cell containing the key value to text, but then another formula
reading this cell doesn't work. Help!





All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com