Leonardo1234
Member
Code:
Const START_COL_ORIG As Integer = 1
Const START_COL_DEST As Integer = 2
Const SHEET_ORIG As String = "Sheet1"
Const SHEET_DEST As String = "Sheet2"
Public Sub STEP3()
Dim shOrig As Worksheet, shDest As Worksheet
Application.ScreenUpdating = False
Set shOrig = Worksheets(SHEET_ORIG)
Set shDest = Worksheets(SHEET_DEST)
shOrig.Select
Application.Union(shOrig.Columns(START_COL_ORIG), shOrig.Columns(START_COL_ORIG + 1)).Select
Selection.Copy
shDest.Activate
shDest.Cells(1, START_COL_DEST).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
This vba codes copy column A & B from sheet1 and paste to column B & C in sheet2
what i need in this is copy column A,B,C,D,E from sheet1 and paste to sheet2 in column B,C,D,E,F
Last edited by a moderator: