Copy Columns To Last Unused Column

  • i have a sheet that i need to copy rows A & B on the same sheet to the last unused column. for instance i want to copy A & B to G if that is the last column so on and so forth.

  • Re: Copy Columns To Last Unused Column


    try


    Code
    Sub Macro1()
       Dim iLC As Integer
       
       iLC = Cells.Find(what:="*", SearchOrder:=xlByColumns, _
          SearchDirection:=xlPrevious).Column
        Columns("A:B").Copy
        Cells(1, iLC + 1).EntireColumn.Select
        ActiveSheet.Paste
    End Sub

Participate now!

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