I have to copy data from column U, AR and BF from sheet 1 and paste it to column A, B, C in sheet 2. I need a vba macro code for this.
Thanks in advance.
I have to copy data from column U, AR and BF from sheet 1 and paste it to column A, B, C in sheet 2. I need a vba macro code for this.
Thanks in advance.
look at
How can I copy columns from one sheet to another with VBA in Excel?
Sub foo1()
Dim src As Worksheet
Dim trg As Worksheet
Dim LastRow As Long
Set src = ThisWorkbook.Worksheets("Sheet1")
Set trg = ThisWorkbook.Worksheets("Sheet2")
src.Range("U:U").Copy Destination:=trg.Range("A1")
src.Range("AR:AR").Copy Destination:=trg.Range("B1")
src.Range("BF:BF").Copy Destination:=trg.Range("C1")
End Sub