Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function to convert A/B/C/... to 1/2/3/4/...

Status
Not open for further replies.

codecref

Programmer
Dec 8, 2003
118
0
0
US
Is there any existing function to convert string like A to 1 and B 2 and so on?

Thanks
 
not that I know of but try this

Code:
dim letter as string
dim letternumber as integer
letter = "A"
letternumber = Asc(letter.ToUpper) - 64

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
good idea, it could have came in my mind .. thanks alot
 
Note that this solution only works for ASCII (character values < 128).

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top