![]() |
Excel Formula Help
I need a formula that returns a "1" in Cell B4 if A4 has text and a "0" if A4
is a blank cell. |
Excel Formula Help
=IF(A4="",0,1)
-- Gary''s Student - gsnu200796 |
Excel Formula Help
This will return 1 if text or nothing if not blank and not text, or 0 for
blank =IF(LEN(TRIM(A7))0,IF(ISTEXT(A7),1,""),0) -- Don Guillett Microsoft MVP Excel SalesAid Software "JC" wrote in message ... I need a formula that returns a "1" in Cell B4 if A4 has text and a "0" if A4 is a blank cell. |
Excel Formula Help
It worked! Thank you.
"Gary''s Student" wrote: =IF(A4="",0,1) -- Gary''s Student - gsnu200796 |
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. |
Excel Formula Help
=IF(ISTEXT(A4,1,IF(ISBLANK(A4),0,"A4 may have a number?"))
If, of course you don't want to distinguish between text and a number, the formula could be changed, and similarly if you don't want to draw a distinction between a blank cell and an empty text string. Another possibility, depending on the answer to those questions, might be =IF(A4="",0,1) or even =--(A4<"") I have assumed that you want B4 to contain a number 0 or 1, rather than text strings "0" or "1". -- David Biddulph "JC" wrote in message ... I need a formula that returns a "1" in Cell B4 if A4 has text and a "0" if A4 is a blank cell. |
All times are GMT +1. The time now is 04:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com