+ Reply to Thread
Results 1 to 3 of 3

Can not create the correct code for Macro to paste to blank column

  1. #1
    Registered User
    Join Date
    04-06-2011
    Location
    Fort Mill, SC
    MS-Off Ver
    Excel 2003
    Posts
    2

    Can not create the correct code for Macro to paste to blank column

    I am stuck. I am trying to create a macro to do the following:

    Copy range C6:C14
    Paste this range to the second empty column of the same worksheet at the same starting row.
    It will always copy the same range but will need to paste to new columns based on which columns are empty.

    Thanks for the help in advance.
    Last edited by Elvis1960; 04-06-2011 at 02:03 PM. Reason: Broke a rule.

  2. #2
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Can not create the correct code for Macro to paste to blank column

    Do you have an example workbook that you can attach? Not sure what you have wrong with your macro...need to post a file or something to tinker with
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  3. #3
    Registered User
    Join Date
    04-06-2011
    Location
    Fort Mill, SC
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Can not create the correct code for Macro to paste to blank column

    Here is the code that I have but it does not work. I want the macro to copy the range then find the next empty column +1 and paste the date starting on the same row.

    Code:

    Sub Macro3()
    '
    ' Macro3 Macro
    ' Macro recorded 04/07/2011'

    '
    Range("B5:D20").Select
    Range("B20").Activate
    Selection.Copy
    Range("A" & Rows.Count).End(xlUp).Row4
    Cells(2, Columns.Count).End(xlToLeft).Column10 1
    ActiveSheet.Paste
    Range("G14").Select
    End Sub


    End Code.

+ 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