Associating Numbers to Letters

# Thread: Associating Numbers to Letters

1. Senior Member
Join Date
Dec 1969
Posts
1,671

## Associating Numbers to Letters

What&#039;s the best way to write a loop associating letters to numbers... ie A is 1, B is 2, C is 3... etc.

2. Senior Member
Join Date
Dec 1969
Posts
11,334

## Use ASCII

For i = 65 to 90 &#039;Same as A to Z<BR> Response.Write Chr(i)<BR>Next

3. Senior Member
Join Date
Dec 1969
Posts
1,671

## I need more clarification please...

I don&#039;t quite understand. I think this is backwards, I&#039;m taking letters and wanting to turn them into numbers. How can I take a given letter, turn it into a number, and then do something with that number. If what you said is correct for what I want to do, can you explain it better how it works?

4. Senior Member
Join Date
Dec 1969
Posts
3,921

## He means this...

&nbsp;<BR> nLetter = ASC("A")<BR> response.write nLetter &#039; value will be 65

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•