+ Reply to Thread
Results 1 to 5 of 5

Macro that copies every 600 rows and paste data in new spreadsheet

  1. #1
    Registered User
    Join Date
    03-27-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Macro that copies every 600 rows and paste data in new spreadsheet

    I am trying to write a macro that will copy data stored in every 600 rows to a new spreadsheet - i have tried to upload a trimmed version of the spreadsheet but the up loader is not working for me!

    The spreadsheet contains 450,000 rows of data; column A is time, column B is signal response.

    i would like to write a macro that copies every 600 rows of data (A1:B600, A601:B1200, A1201:B1800, etc) to a new spreadsheet tab.

    For example:
    sheet 1 - select A1:B600 (copy), sheet 2 A1 (paste)
    sheet 1 - select A601:B1200 (copy), sheet 2 C1 (paste)
    sheet 1 - select A1201:B1800 (copy), sheet 2 E1 (paste)
    ect....for every 600 rows until all data is copied.

    I have limited experience with excel macros - the only way i know how to do this is by writing code for action. I was hoping that someone could help write code that is more automated

    thanks in advance

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Macro that copies every 600 rows and paste data in new spreadsheet

    Hi Bealey, welcome to the forum.

    The following macro should move your data to sheet2 as requested.
    Please Login or Register  to view this content.
    Hope it helps!

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,523

    Re: Macro that copies every 600 rows and paste data in new spreadsheet

    Would something like this do it (Try on a copy of your workbook)

    Change "Sheet2" in this code to the Sheetname with the 450,000 rows of info

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-27-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro that copies every 600 rows and paste data in new spreadsheet

    Thanks Paul- the macro you wrote worked a dream....I must say the code was more complicated than envisaged, especially for a macro novice like me.

    I am now looking for a macro to calculate the median of each column, then subtract the median from each data point within the column and present the new data points in a third spreadsheet....can you give me any pointers?

    Again - your assistance is much appreciated

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro that copies every 600 rows and paste data in new spreadsheet

    Bealey, sounds like THIS thread is resolved. Best to post new completely new questions in new threads.

    If that takes care of your original titled need, please click Thread Tools above your first post and mark this thread as SOLVED.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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