+ Reply to Thread
Results 1 to 7 of 7

Copy data from sheet1 to sheet2

  1. #1
    Registered User
    Join Date
    03-10-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Copy data from sheet1 to sheet2

    How do I copy data from one sheet to another - the first sheet has a fixed range of data and I need to copy this to sheet2 so that data is added to the first blank row in sheet2. Also, how can I code this so that it does this periodically (every 30 seconds)?
    Last edited by BigBlackMamba; 03-11-2010 at 07:48 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy data from sheet1 to sheet2

    Hi BigBlackMamba

    What happens to the data on sheet1 after it's been copied to sheet2? Does it get erased? Does it stay on sheet1 and get marked as processed? If it gets marked, what column?

    You indicate you want this process to run every 30 seconds. I don't know the source of the data for sheet1 and I don't know the consequences of running this procedure when sheet1 data is being updated. But, it can be done.

    A sample of your data would be nice.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    03-10-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy data from sheet1 to sheet2

    Quote Originally Posted by jaslake View Post
    Hi BigBlackMamba

    What happens to the data on sheet1 after it's been copied to sheet2? Does it get erased? Does it stay on sheet1 and get marked as processed? If it gets marked, what column?

    You indicate you want this process to run every 30 seconds. I don't know the source of the data for sheet1 and I don't know the consequences of running this procedure when sheet1 data is being updated. But, it can be done.

    A sample of your data would be nice.

    John

    Thanks for responding.

    The data in Sheet 1 is will not get erased or marked as updated - it's streaming data from a data supplier. All I'm trying to do is take a snapshot of this data as fast as possible. The second sheet will be copied to a third sheet in a summarized form and then erased from sheet 2.

    I don't have any sample data to show you as yet.

    Are there any limitations on how fast Excel can copy this data (from sheet1 into 2)? e.g. could this be done every second or 2 seconds?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy data from sheet1 to sheet2

    Hi BigBlackMamba

    Put this code in the Workbook Module
    Please Login or Register  to view this content.
    Put this code in a general module
    Please Login or Register  to view this content.
    A sample book is attached for your perusal. The code is set to run every 2 seconds.

    John
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-10-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy data from sheet1 to sheet2

    Thanks - that's really good!!

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy data from sheet1 to sheet2

    Hi BigBlackMamba

    What you have may work well in a static world (sheet 1 is not being updated). I've no idea what happens when sheet 1 is being updated the same time the procedure runs on the timer. Guess we'll find out.

    If your immediate issue is resolved, please mark your post as "solved". A click on the scales is appreciated if you feel it;s appropriate.

    John

  7. #7
    Registered User
    Join Date
    03-10-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy data from sheet1 to sheet2

    Quote Originally Posted by jaslake View Post
    Hi BigBlackMamba

    What you have may work well in a static world (sheet 1 is not being updated). I've no idea what happens when sheet 1 is being updated the same time the procedure runs on the timer. Guess we'll find out.

    If your immediate issue is resolved, please mark your post as "solved". A click on the scales is appreciated if you feel it;s appropriate.

    John
    Yes indeed......I ran it over static data with 700 rows and it worked very nicely but the acid
    test really will be with streaming data......fingers crossed!! Thanks again for your help - I suspect you've written one or two programs in your time

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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