Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching Uppercase characters Shams Excel Discussion (Misc queries) 3 July 15th 09 02:20 PM
Changing column headers from alphabetical characters to numbers? dylan Excel Discussion (Misc queries) 2 July 24th 08 04:27 PM
number's value in alphabetical characters Subbiah Excel Discussion (Misc queries) 3 March 5th 07 12:05 PM
Formulas dealing with searching for characters Electro7 Excel Worksheet Functions 3 February 17th 06 12:38 AM
searching for the first few characters in an active cell Chris Excel Programming 1 June 17th 04 10:27 PM


All times are GMT +1. The time now is 02:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"