Problem with ISTEXT()

S

Schizoid Man

Why does the following formula return TRUE?

=ISTEXT(LEFT(A1,1))

where cell A1 contains the text "10Y".
 
P

Peo Sjoblom

Because LEFT is a text function, this will work

=ISTEXT(--LEFT(A1,1))

--


Regards,


Peo Sjoblom
 
P

Peo Sjoblom

Note that if the leftmost character is not a number the formula will be
incorrect so it's better to use ISNUMBER instead


=ISNUMBER(--(LEFT(A1,1)))


will return TRUE for 10Y and FALSE for YYY

--


Regards,


Peo Sjoblom
 

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