+ Reply to Thread
Results 1 to 7 of 7

Copy data (values and format) to new created sheets

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    Copy data (values and format) to new created sheets

    Hi everyone,
    I have a macro that allows me to create 2 new sheets. This works perfect:
    Please Login or Register  to view this content.
    Now I want to copy the following data (values and format) to the new sheets:

    Sheets("Data").Range(P:Z) usedrange to shName (starting at A1)
    Sheets("Data").Range(AA:AC) usedrange to shName (starting at A1)

    Can you please help me?
    Thanks a lot
    Roman

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy data (values and format) to new created sheets

    Does this help?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    Re: Copy data (values and format) to new created sheets

    Hi John,
    thanks for your code. But I get an error at this line

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy data (values and format) to new created sheets

    What is the error?

  5. #5
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    Re: Copy data (values and format) to new created sheets

    Runtime error -1004

  6. #6
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    Re: Copy data (values and format) to new created sheets

    runtime -1004

    I tried to combine the 2 Codes

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy data (values and format) to new created sheets

    You have to define variable x.

    Please Login or Register  to view this content.
    Not sure this will work either. I think you have to expand your Do Loop. Let's see.

+ 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. [SOLVED] Alter Code for Copy and Paste of Data to Created New Sheets.
    By Ortz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2014, 10:32 PM
  2. Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  4. Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  5. Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  6. Replies: 1
    Last Post: 07-06-2005, 06:05 PM
  7. Replies: 1
    Last Post: 07-06-2005, 05:05 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