+ Reply to Thread
Results 1 to 12 of 12

Copy/Paste Data from Sheet1 to Sheet2

  1. #1
    Registered User
    Join Date
    06-05-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2013
    Posts
    46

    Copy/Paste Data from Sheet1 to Sheet2

    I have a list in Column A of Sheet 1 with more than 3000 entries. This list is updated constantly.
    I want to put Column A from Sheet 1 to Column A4 in Sheet 2, with the option to for the program to figure out end of row and copy only till the last row.

    I've tried couple of VBA codes but it does not work properly. P.S. I am not good with VBA, just basic understanding.

    Thanks for your help. Really appreciate it.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Copy/Paste Data from Sheet1 to Sheet2

    assuming sheet 1 range starts at A1

    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    06-05-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2013
    Posts
    46

    Re: Copy/Paste Data from Sheet1 to Sheet2

    Thank you for a quick reply.

    There is a problem with this code. So what I did is I made it into a button. Now every time I press the button the code only executes 3 rows at a time. In others words every time I press the button it shows 3 new rows, not all of the column from sheet 1 !@#$%^??

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Copy/Paste Data from Sheet1 to Sheet2

    double post
    Last edited by humdingaling; 06-11-2015 at 10:04 PM. Reason: double post

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Copy/Paste Data from Sheet1 to Sheet2

    amended code
    to take last row from sheet 1 instead of the sheet you run the macro on


    Please Login or Register  to view this content.
    Last edited by humdingaling; 06-11-2015 at 10:04 PM.

  6. #6
    Registered User
    Join Date
    06-05-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2013
    Posts
    46

    Re: Copy/Paste Data from Sheet1 to Sheet2

    Still every time I run it, shows three new rows at a time. Is there another way to write this code?

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Copy/Paste Data from Sheet1 to Sheet2

    Please Login or Register  to view this content.
    Last edited by humdingaling; 06-11-2015 at 11:35 PM.

  8. #8
    Registered User
    Join Date
    06-05-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2013
    Posts
    46

    Re: Copy/Paste Data from Sheet1 to Sheet2

    Its giving me 2307, which I think is the number of rows I have in Sheet 1.

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Copy/Paste Data from Sheet1 to Sheet2

    not required
    Last edited by humdingaling; 06-11-2015 at 10:29 PM. Reason: withdrawn by hum

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Copy/Paste Data from Sheet1 to Sheet2

    ok found the problem
    the syntax of the last row wasn't counting sheet 1

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    06-05-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2013
    Posts
    46

    Re: Copy/Paste Data from Sheet1 to Sheet2

    I tired the first code you provided again. And this time it is working fine. Now it is outputting the whole Column properly.

    Although I am running into another problem. When I add one more row and refresh the macro it outputs with that row. Great! But when I delete that new row and run it again. That new row is still there. So I am assuming that it is not clearing Column A from Sheet 2 before refreshing. How can I accomplish that.

    Humdingaling, really appreciate your help.

  12. #12
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Copy/Paste Data from Sheet1 to Sheet2

    This should do the trick
    i added extra comments to explain what it does

    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. Macro to copy the data from sheet1 and to paste it in sheet2 with conditions.
    By Thinker8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2014, 09:55 AM
  2. Replies: 6
    Last Post: 07-25-2013, 02:58 PM
  3. [SOLVED] Copy Range of data from sheet1 and sheet2 paste it in sheet3
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2013, 05:55 AM
  4. Copy Range of data from sheet1 and sheet2 paste it in sheet3
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2013, 05:47 AM
  5. [SOLVED] Copy data from column A and B Sheet1 and paste into Sheet2
    By rabra in forum Excel General
    Replies: 2
    Last Post: 02-03-2013, 11:39 AM

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