+ Reply to Thread
Results 1 to 6 of 6

Copy and paste specific data to new worksheets instead of new workbooks

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    29

    Copy and paste specific data to new worksheets instead of new workbooks

    Hi All,

    I have a code which takes the unique values in column F and pastes all the data in it into a new workbook. I have tried to use the same code (below) but change it so that instead of copying in the data into a new workbook, it does it into a new worksheet in the same workbook. I'm just not sure of the language to use - I tried just changing "book" to "sheet" but that obviously didn't work (see below), and my macro skills are beginner level.

    Can anyone help please?


    Please Login or Register  to view this content.

  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 and paste specific data to new worksheets instead of new workbooks

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-16-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Copy and paste specific data to new worksheets instead of new workbooks

    Hi John,

    Thanks for your help.

    For some reason it's looking for a For statement where "Next Cell" is?

    Cheers

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy and paste specific data to new worksheets instead of new workbooks

    Where is the opening loop in your code? You have next cell closed, but where is

    Please Login or Register  to view this content.
    statement ?
    The code as it is now should error.

  5. #5
    Registered User
    Join Date
    04-16-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Copy and paste specific data to new worksheets instead of new workbooks

    Assuming this pic comes through ok - this is what I am getting.

    10-01-2014 11-00-49 AM.png

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy and paste specific data to new worksheets instead of new workbooks

    Yes, the code errors on next cell line.
    This code works, but if you re-run it, you will get another error saying the sheet name exists.
    Try it and will adjust the code.

    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)

Similar Threads

  1. Extract data from cells in specific worksheets in multiple workbooks
    By bm97sph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2013, 08:22 AM
  2. Copy/Paste Range of Data from Multiple Workbooks/Worksheets to Master Workbook/Worksheets
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2013, 08:21 PM
  3. Pasting data from MANY workbooks into specific worksheets of a master workbook
    By beemoney19 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-17-2012, 11:30 PM
  4. Copy & Paste worksheets between workbooks
    By SAG2011 in forum Excel General
    Replies: 1
    Last Post: 03-30-2008, 10:21 PM
  5. cannot copy and paste worksheets or workbooks
    By Tim in forum Excel General
    Replies: 1
    Last Post: 03-29-2005, 03:06 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