The idea from Emile is the correct one. Have a look at an ASCII tabe (for instance http://asciichart.com). From A to Z are the numbers 65 to 90. Chr(65) = A and so on. Then you need to do an integer division of 26 to get the number of letters. Can you now get the algorithm?