Illegal Excel name characters

Illegal Excel name characters

2 October 2016

An Excel pioneer, Peter Bartholomew, likes to create Excel names using odd characters.

For example, he uses a ? at the end of a name to identify it as a Boolean value like YES/NO or TRUE/FALSE. He also uses to indicate the name points to a prior value.

I like his concept. But I was shocked to see his names because I was led to believe those characters were illegal.

I checked my sources which include Microsoft's reference and the best VBA websites. None of them provided a complete list of invalid characters and some were just plain wrong.

So I rolled up my sleeves and wrote some code to create Excel names using the ASCII standard (first 255) character set:

  • Symbols shaded in red cannot be used anywhere in Excel names.
  • Symbols shaded in yellow cannot be used as the first character in Excel names.
  • All other codes can be used anywhere in Excel names.