+ Reply to Thread
Results 1 to 6 of 6

record a macro to copy data and paste into next empty column on another worksheet?

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    147

    Post record a macro to copy data and paste into next empty column on another worksheet?

    Hi guys,

    I hope you can help, because I am stuck in doing the following:

    What I would like to do is create a macro which will copy data from cells D5:D9 (in sheet 1) and paste into cells D4:D8 in sheet2.
    The following month, I would like the data to be copied from the same cells, but pasted into cells E4:E8 and so on.
    Please see attached for example.
    I have tried using option explicit, but was getting syntax error.

    I hope you can help?

    Regards

    N
    Attached Files Attached Files

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

    Re: record a macro to copy data and paste into next empty column on another worksheet?

    This macro will copy in to next column but the same row

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: record a macro to copy data and paste into next empty column on another worksheet?

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Forum Contributor
    Join Date
    01-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: record a macro to copy data and paste into next empty column on another worksheet?

    Thanks for the reply, but this does not work.
    This copies the data, but pastes over the data again. I am looking for a macro to copy data into the next empty column?
    Any ideas?

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: record a macro to copy data and paste into next empty column on another worksheet?

    I don't understand. You said the next month copy to the next column. My macro determines the current month and copies it there as suggested by the sheet with month headers for each column?

  6. #6
    Forum Contributor
    Join Date
    01-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: record a macro to copy data and paste into next empty column on another worksheet?

    My apologies, I thought I would attach a simplified sample with doing this on a monthly basis.
    It is done on a weekly basis and the day is not always the same.
    Therefore I was hoping someone can help with the option explicit code and knows how to identify the next blank cell?

    Regards

+ 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