Illegal Excel Name Characters

Post date: Sep 25, 2016 2:59:12 AM

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. At bottom is what the code reveals:

    • 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.

I'm sure some are wondering how Peter creates names with these odd characters when our keyboards don't have such keys. To produce the odd characters, or any of these characters, we must:

    • Make sure the Num Lock is engaged on our numeric keypad

    • Hold down the ALT key while keying in the Code from the table below.

As an example, let us imagine creating a deck of cards in name manager. We could create the name ACE♠ by typing "ACE" and then holding down the ALT key while pressing "6" on the numeric keypad.

The definitive list of legal and illegal characters in Excel Names.