ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Searching for Alphabetical Characters (https://www.excelbanter.com/excel-programming/375811-searching-alphabetical-characters.html)

Neily[_3_]

Searching for Alphabetical Characters
 
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?

excelent

Searching for Alphabetical Characters
 
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:

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?


Neily[_3_]

Searching for Alphabetical Characters
 
Spot on, exactly what I was looking for.

"excelent" wrote:

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:

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?


Adrian D. Bailey

Searching for Alphabetical Characters
 
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.
Tel: 01509 223007 Fax: 01509 223940

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

"Neily" wrote in message
...
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?





All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com