Named Ranges - what characters are (or are not) allowed in the nam

B

Barb Reinhardt

I'm trying to create named ranges programmatically and need to know what
characters are and are not allowed in the names. So far, I assume that _ and
text are included. I know that a lot of special characters are not
(&,+,-,space, etc).

Can someone assist?

Thanks,
Barb
 
N

Niek Otten

Hi Barb,

From Excel Help:

What characters are allowed? The first character of a name must be a letter, an underscore character (_), or a backslash (\).
Remaining characters in the name can be letters, numbers, periods, and underscore characters.


--
Kind regards,

Niek Otten
Microsoft MVP - Excel


| I'm trying to create named ranges programmatically and need to know what
| characters are and are not allowed in the names. So far, I assume that _ and
| text are included. I know that a lot of special characters are not
| (&,+,-,space, etc).
|
| Can someone assist?
|
| Thanks,
| Barb
 
B

Bernie Deitrick

Barb,

Names can contain letters, numbers, and underscores, and the first character cannot be a number.
Also, the name cannot be interpreted by Excel as a valid range address in either A1 or R1C1
notation: C, C1, AA45, CC1245, R12C13, etc are invalid. And it's a good idea to have at least 5
leading alpha characters, since Excel 2007 will have up to 4 alphas as column letters.

Visit

http://www.cpearson.com/excel/named.htm

for more.


HTH,
Bernie
MS Excel MVP
 
N

Niek Otten

<Also, the name cannot be interpreted by Excel as a valid range address in either A1 or R1C1 >

Good point! And if there's any chance of your workbook being used in other language versions of Excel (RK, LC, etc) avoid this
construction anyway.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Barb,
|
| Names can contain letters, numbers, and underscores, and the first character cannot be a number.
| Also, the name cannot be interpreted by Excel as a valid range address in either A1 or R1C1
| notation: C, C1, AA45, CC1245, R12C13, etc are invalid. And it's a good idea to have at least 5
| leading alpha characters, since Excel 2007 will have up to 4 alphas as column letters.
|
| Visit
|
| http://www.cpearson.com/excel/named.htm
|
| for more.
|
|
| HTH,
| Bernie
| MS Excel MVP
|
|
| | > I'm trying to create named ranges programmatically and need to know what
| > characters are and are not allowed in the names. So far, I assume that _ and
| > text are included. I know that a lot of special characters are not
| > (&,+,-,space, etc).
| >
| > Can someone assist?
| >
| > Thanks,
| > Barb
|
|
 
Top