Cell function required

M

mickbarry

Hi all,
I need a function which tells me if a cell contains
an alpha character.
That is if cell contains "g" then True
if cell contains 7 then False

Regards Mick Barry

There are never enough hours in the day, but always too many days
before Saturday.
 
B

Bob Phillips

=ISNUMBER(A1)

tests for a number, but that will also pass 123

--

HTH

Bob Phillips

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

daddylonglegs

=ISTEXT(A1)

although you can have 7 in a cell formatted as text and this will
return TRUE
 
B

Biff

Hi!

Try this:

=ISERROR(A1*1)

You could use:

=ISTEXT(A1)

However, if cell A1 is formatted as TEXT and contains the entry: 7,
ISTEXT(A1) will return TRUE. Using the ISERROR method accounts for that.

Biff
 
J

JE McGimpsey

One way:

If a particular alpha character:

=A1="g"

If any alpha character:

=AND(A1>="a",A1<="z")

or perhaps


=AND(A1>="a",A1<="z",LEN(A1)=1)

to prevent "a123" from returning TRUE


Or, if you just want to make sure the entry isn't numeric:

=NOT(ISNUMBER(A1))
 
M

mickbarry

Thanks Bob,
The function "Code" looks at the ASCII list (computer character
set)
The formula =IF(AND(CODE(C1)>64,CODE(C1)<123),TRUE,FALSE)
does a pretty good job, however there are a few exceptions
eg "/,],[,^" will also produce a True.

Regards Mick Barry

Anyway, like I was sayin', wabbit is the fruit of the land. You can
barbecue it, boil it, broil it, bake it, saute it. Dey's uh,
wabbit-kabobs, wabbit creole, wabbit gumbo. Pan fried, deep fried,
stir-fried. There's pineapple wabbit, lemon wabbit, coconut wabbit,
pepper wabbit, wabbit soup, wabbit stew, wabbit salad, wabbit and
potatoes, wabbit burger, wabbit sandwich. That- that's about it.
 
M

mickbarry

Nice one Mr McGimpsey
I'll go with your suggestion.
It even gives the OK to Scandinavian alpha.

Regards Mick Barry

"My world my country" rather than "My country my world"
 
Top