calculate next in alphabet

T

TMGreen

How do I compute the next alphabetic character through code? I have a
variable (string) containing a single alpha letter (ie 'B') and i need to
determine the next alphabetic value (ie "C"). How can this be done?
 
A

Allen Browne

Use Asc() to get the ascii code of the character.
Add 1, and use Chr() to get the next character.

Example:
=Chr(Asc("B")+1)
 
Top