View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Excel Formula Help

On Jul 30, 8:56*am, JC wrote:
I need a formula that returns a "1" in Cell B4 if A4 has
text and a "0" if A4 is a blank cell.


Unfortunately, the phrases "has text" and "is blank" are ambigous.
Excel makes a distinction between text and numeric values. And Excel
makes a distinction between an empty cell (i.e. no formula or
constant) and a cell whose value is the null string; both appear
"blank", as well as a string of spaces.

If we take your request literally, then what do you want if neither
condition is true?

Perhaps the following will meet your needs (but I doubt it).

=if(istext(A4), 1, if(A4="", 0, ""))

Note that A4="" is true is A4 is empty, or A4 contains a value that is
the null string like the last else-expression of the second IF
function above.