+ Reply to Thread
Results 1 to 4 of 4

I need to rename a worksheet and don't want to type. Pasting does not work? Code?

  1. #1
    Registered User
    Join Date
    03-16-2012
    Location
    MN
    MS-Off Ver
    Excel 2010
    Posts
    50

    I need to rename a worksheet and don't want to type. Pasting does not work? Code?

    I need to rename a worksheet to a long string of numbers and text which is really tedious to type. Pasting does not seem to work.

    Is there a way to make this happen, perhaps with VBA?

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: I need to rename a worksheet and don't want to type. Pasting does not work? Code?

    Select the cell with the long string of numbers and in the formula bar select the numbers and copy. Then right click on the worksheet tab, click on Rename and Paste. Hit enter and the worksheet will be renamed to the number.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: I need to rename a worksheet and don't want to type. Pasting does not work? Code?

    A worksheet name can't be longer than 31 characters - are you trying to paste something longer than that?
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  4. #4
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: I need to rename a worksheet and don't want to type. Pasting does not work? Code?

    You can try this:

    ActiveSheet.Name=Range("cell that contains long string of number").Value
    If I've helped U pls click on d *Add Reputation

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Having a Subscript issue on Worksheet rename code
    By pynergee in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-30-2013, 02:38 PM
  2. Replies: 7
    Last Post: 08-06-2013, 02:23 PM
  3. [SOLVED] 'Runtime Error 1004' when trying to Rename Worksheet using vba code
    By Raporter65 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-28-2013, 07:43 PM
  4. VBA code for copying a worksheet and pasting it as a new worksheet in Excel
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-27-2012, 11:56 AM
  5. Replies: 2
    Last Post: 09-04-2012, 01:19 AM
  6. Code not pasting work in right cell
    By comp23 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2012, 09:22 AM
  7. Pasting code into a worksheet by finding the last liine of text
    By jeskit in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-21-2011, 07:28 AM
  8. VBA code to Copy and Rename Worksheet
    By LampCommandr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2010, 07:19 PM

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