Searching for Alphabetical Characters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need a way fo identifying if a character within a string is alphabetic
character.
Is there an easy way to do this? I thought of something like the reverse of
the chr() command where you give it a letter and it returns the ascii number
for that character.

Any ideas?
 
Sub test()
Dim x, t
x = "2Di3sco4ver5"
For t = 1 To Len(x)
If Not IsNumeric(Mid(x, t, 1)) Then MsgBox ("") & Mid(x, t, 1)
Next
End Sub



"Neily" skrev:
 
Spot on, exactly what I was looking for.

excelent said:
Sub test()
Dim x, t
x = "2Di3sco4ver5"
For t = 1 To Len(x)
If Not IsNumeric(Mid(x, t, 1)) Then MsgBox ("") & Mid(x, t, 1)
Next
End Sub



"Neily" skrev:
 
A worksheet function that might help you is CODE.
eg. CODE("a") returns 97, the ascii code number for the lowercase a.

--
Adrian D.Bailey, Information and Systems Manager, Dept.Human Sciences
Loughborough University, Loughborough Leics, LE11 3TU, UK.
(e-mail address removed) Tel: 01509 223007 Fax: 01509 223940

Community Warden, Storer and Burleigh Areas. Out-of-hours Tel: 01509 563263
 

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

Back
Top