+ Reply to Thread
Results 1 to 9 of 9

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

  1. #1
    Barb Reinhardt
    Guest

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

    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

  2. #2
    Niek Otten
    Guest

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

    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


    "Barb Reinhardt" <[email protected]> wrote in message
    news:[email protected]...
    | 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



  3. #3
    Bernie Deitrick
    Guest

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

    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


    "Barb Reinhardt" <[email protected]> wrote in message
    news:[email protected]...
    > 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




  4. #4
    Niek Otten
    Guest

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

    <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

    "Bernie Deitrick" <deitbe @ consumer dot org> wrote in message news:%[email protected]...
    | 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
    |
    |
    | "Barb Reinhardt" <[email protected]> wrote in message
    | news:[email protected]...
    | > 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
    |
    |



  5. #5
    Registered User
    Join Date
    01-24-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

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

    In addition to what is above the following characters are not allowed:

    (
    )
    ,
    ;
    :
    &
    /

    brackets, comma, ampersand, colon, semi-colon & ampersand.

    There may be others.

    Joe

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

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

    Hi Joe. Welcome to the forum.

    This thread is over 12 years old. It is unlikely that the original participants are still subscribed. There is no rule against this. Just thought you might want to know.

    Dave
    Dave

  7. #7
    Registered User
    Join Date
    01-24-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2
    Thanks Dave,

    I noticed that, but even after 12 years this thread still comes top of google (or very nearly) for the query I had, which I couldn't find answered fully anywhere online. So, I thought others might benefit from knowing even if the OP has given up caring.

    Joe
    Last edited by AliGW; 10-18-2018 at 01:47 AM. Reason: Unnecessary quotation removed.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

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

    nojoble thanks for the update
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Registered User
    Join Date
    04-16-2024
    Location
    US
    MS-Off Ver
    2016
    Posts
    1

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

    Checking in 6 years later letting y'all know this thread is still relevant

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1