+ Reply to Thread
Results 1 to 6 of 6

Range Error naming worksheet

  1. #1
    Forum Contributor
    Join Date
    04-19-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    180

    Range Error naming worksheet

    Hi guys,

    I'm creating a new worksheets with a chart for each row of data. I need each worksheet to be given the name of the data in columns B and C (ie. surname and forename); however I'm getting a "Method Range Error"

    Here's a bit of the code that works for just one column (ie. column B)

    Please Login or Register  to view this content.
    I know it's something really simple and you'll have to excuse my ignorance .. I'm pretty new to Excel.

    Thank you
    Last edited by technik; 04-19-2010 at 05:29 PM. Reason: SOLVED

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Range Error naming worksheet

    Welcome to the forum, technik.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Range Error naming worksheet

    If you add a new sheet, the sheet is blank (unless you have a default sheet template with data in it). Therefore column B is blank, and a null string is not a valid worksheet name.

  4. #4
    Forum Contributor
    Join Date
    04-19-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Range Error naming worksheet

    Thanks for replying shg.

    The snippet of code I posted actually works fine. It's this line I'm having problems with

    Please Login or Register  to view this content.
    If I change this to

    Please Login or Register  to view this content.
    i get the error

    i'm just trying to get the worksheet to be called the surname and forename of the person in the row

    Sorry if you've already answered my question in your reply, but I didn't really get it.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Range Error naming worksheet

    Sorry if you've already answered my question in your reply, but I didn't really get it.
    I haven't, I misread your code, sorry.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-19-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Range Error naming worksheet

    Brilliant... that worked...

    Thanks a bunch!

+ 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