Logical test of text?

D

Dredgeboat

In using the If function, I would like to test if a cell has text in it, not
specific text, just any text, such as a name (Tim Dyer). What do I use to
represent the text in the argument?
 
F

Francis

try

=IF(ISTEXT(A2),"Y","N")

this will return "Y" if A2 is text, otherwise, it will give you "N"
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another
 
J

Jacob Skaria

Use the T() function. Returns text if text.

=IF(T(A1)=A1,"Text","None Text")

If this post helps click Yes
 
T

T. Valko

=IF(T(A1)=A1,"Text","None Text")

That might be ok but if A1 is an empty cell it'll return "Text".
 
J

JoeU2004

Dredgeboat said:
In using the If function, I would like to test if a cell has text in it

Be sure to test proposed solutions with the following cases to be sure you
get the results you are looking for (je ne sais quoi):

1. An empty cell; no constant, no formula.

2. A cell with null text. Examples: =""; and =if(true,"")

3. A cell with one or blanks. Examples: =" "; and =if(true," ")


----- original message -----
 
R

Ron Rosenfeld

In using the If function, I would like to test if a cell has text in it, not
specific text, just any text, such as a name (Tim Dyer). What do I use to
represent the text in the argument?

=LEN(T(A1))>0

Will return TRUE if there is text, else FALSE.

It returns error values if there is an error in A1 -- not sure what you want to
do in that case.

Here is an example of how you might use this:

=IF(ISERROR(A1),"Not Text",IF(LEN(T(A1))>0,"Text","Not Text"))

--ron
 
H

Harlan Grove

Ron Rosenfeld said:
=LEN(T(A1))>0
....

What benefit does this provide that ISTEXT(A1) doesn't other than
propagating errors? Also begs the philosophical question whether "" is
text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top