+ Reply to Thread
Results 1 to 4 of 4

Create a new and renamed worksheet but still keep the orginal content

Hybrid View

  1. #1
    Registered User
    Join Date
    08-29-2014
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    2

    Create a new and renamed worksheet but still keep the orginal content

    Hi all,

    I have a 2010 excel sheet and its layout is as below:

    (Column) A B C D E F
    No Supervisor Type 01/01/2014 02/01/2014 03/01/2014

    The sheet contains 70 rows and column B, D, E, F are drop down boxes.

    I need a VBA to generate a new work sheet which contains the original content and drop down boxes. However in the new sheet the date will be the start of next week, such as 08/01/2014, 09/01/2014...

    For the newly created active work sheet, it needs to have new name to reflect the first date of the sheet, such as 01/01/2014 and next sheet is 08/01/2014.

    Can someone help me with this? Thank you!

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Create a new and renamed worksheet but still keep the orginal content

    range("what ever cell").value =date-(weekday(date())-2)

    thisworkbook.saveas "MYBOOK" & format(date-(weekday(date())-2),"ddmmyyyy") & ".xlsx"
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    Re: Create a new and renamed worksheet but still keep the orginal content

    My apologies, I read this wrong and posted a save as macro, Nathansav has it succinctly.
    Last edited by Coleman34; 08-29-2014 at 10:53 AM. Reason: error

  4. #4
    Registered User
    Join Date
    08-29-2014
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    2

    Smile Re: Create a new and renamed worksheet but still keep the orginal content

    Thank you all !

+ 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. Excel 2010 Crashes Whenever Worksheet Tab is Renamed
    By jelarv in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2014, 01:08 PM
  2. Macro to Create New Renamed Page from Template
    By b0ttle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2014, 04:02 PM
  3. Create worksheet in masterfile and add content below existing content
    By Hond70 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2011, 09:21 AM
  4. Selecting a Newly Renamed Worksheet
    By sportsranker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2008, 02:20 PM
  5. pivottables: renamed fields and renamed data
    By lalbatros in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2007, 03:30 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