+ Reply to Thread
Results 1 to 2 of 2

Copy/Paste/Rename Tab

  1. #1
    Registered User
    Join Date
    02-10-2011
    Location
    West Coast
    MS-Off Ver
    Excel 2007
    Posts
    1

    Red face Copy/Paste/Rename Tab

    I am new to Excel macro creation, and I have looked around but have not quite found exactly what I am looking for. This is what I am trying to accomplish.

    Create a Macro, I call it: ImprovedSheetCreateDated

    I have 2 existing tabs:
    Template Tab - Which has a sheet ready to take in my information
    Date Range Tab - Has a list of date ranges for 2 years, in column A going down from A1-A24.

    Basic Description:
    This will copy the sheet 'Template' and then paste the copy as a new sheet. Then it copies A1 from 'Date Range' sheet, and renames the new copy of the Template tab with that A1 data. It also pastes A1 from 'Date Range' into A3 of the new sheet.

    The Steps I am taking:
    1). Copy the TEMPLATE tab
    2). Paste the TEMPLATE Tab
    3). In the 'Date Range Tab' copy data in A1.
    4). Use the copied data from A1 in the 'Date Range Tab' to rename the newly created copy of 'Template'.
    5). Paste the A1 data into cell A3, of the newly created copy of 'Template' tab.
    6). Go back to the 'Date Range Tab' and delete A1. Column shifts up, with new data taking its place.

    This is what I have so far:
    Please Login or Register  to view this content.
    The issue I have, is that it is stopping at the section: Sheets("Sheet3").Select

    If I run this more than once, it can't 'FIND' Sheet 3, because it has previously been renamed, and the new sheet created in this process will be 'Sheet 4' etc.

    Any help is very very welcome! Thank you in advance

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy/Paste/Rename Tab

    Try:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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