+ Reply to Thread
Results 1 to 6 of 6

Copy data from single sheet to multiple sheets

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Copy data from single sheet to multiple sheets

    I recieve a daily spreadsheet with ~25,000 rows of data and is 4 columns wide.

    Each day I need to break the data equally up into 19 or 20 different sheets within the same workbook. This is very time consuming as I need to copy the first ~1,000 rows and paste it into the first sheet, then I need to take the next ~1,000 rows and paste it into the second sheet, and so on.

    I have attached a small example with desired output. In my example, the raw data file contains 19 records. For these 19 records, I need to distribute the records evenly between 5 individual sheets. In this case, each sheet will contain 4 records or less.
    Last edited by maacmaac; 01-23-2009 at 11:32 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173
    I almost have it figured out but getting an error on following section of code. I've tried adjusting the code without the quotes, combination of quotes, etc., but nothing seems to work.

    Please Login or Register  to view this content.
    This part of the code works fine if I use
    Please Login or Register  to view this content.
    I just can't get it to work when using the variable names.

    Any help is appreciated. Thanks.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello maacmaac,

    There are two ways to accomplish this. Use strings are you have in your code, or use the Range method. I show you both...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173
    Leith,

    Thanks for the comments. I ran into one more issue which is the next part of the code. The code I want to use is as follows but doesn't work.
    Please Login or Register  to view this content.
    The code will work if the code is like this
    Please Login or Register  to view this content.
    Thanks

    P.S. is the first example the more effiecient way write the code?

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello maacmaac,

    Sorry, I was in a hurry and mistyped that line. Change it to this...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  6. #6
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173
    Working perfect. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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