copy and paste to column vba

  • Hi helpers?


    In the macro below I insert new column A and then copy C1 which is the date and then paste in A1:A2 and then autofill to the last column of A. The question is how to change the range or to autofill with macro if my data is extended?


    Thanks in advance



    Sub Macro1()
    '
    ' Macro1 Macro
    '


    '
    Columns("A:A").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Range("C1").Select
    Selection.Copy
    Range("A1:A2").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Selection.AutoFill Destination:=Range("A1:A19")
    Range("A1:A19").Select
    End Sub

  • Re: copy and paste to column vba


    Hi Zeanah,


    You have posted this in the Hire Help forum, you need to state in the thread title how much you are offereing for a completed solution, and pay 10% of that amount to Ozgrid ( [email protected] ).


    If you meant to post in the free forum reply to this and I will move the thread to the appropriate forum.


    Thanks.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!