calculate next in alphabet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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)
 
Back
Top