• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Modulable copy macro for column continious and non continious

RAM72

Member
Hi

I constanly copy data column from one sheet to another.



So am looking a macro that can copy continious and non continious columns up to last data which is modulable so that I can change the required columns

e.g

Suppose I want to copy column A, C,D , G,L, M,Z,AA,AB CC, DD from sheet 1 to sheet 2 up to last data in column

Can any one help

Thanks
 
Does this help give you some idea? I wasn't exactly sure on the copy if you wanted to append it, or always paste into same spot.
Code:
Sub Example()
Dim myRange As Range
Dim rngToCopy As Range

'Which columns do you want?
Set myRange = Range("A:A, C:D , G:G,L:M,Z:AB, CC:CC, DD:DD")

'Grab only to last row
Set rngToCopy = Intersect(myRange, ActiveSheet.UsedRange)

'Copy it
rngToCopy.Copy Destination:=Worksheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Offset(1)
End Sub
 
Back
Top