Hi I have a code that copies a column data from one workbook to another workbook
Dim wbk As Workbook
Dim strFName As String
Dim strFName1 As String
Dim CopyCol As Long
strFName = Sheet1.Range("A1").Value' Both workbooks path are mentioned in A1 & A2 cell value
strFName1 = Sheet1.Range("A2").Value
Application.ScreenUpdating = False
Set wbk = Workbooks.Open(strFName)
With wbk.Sheets("Data")'sheet name
CopyCol = Range("D" & Rows.Count).End(xlUp).Row
Range("D2:D" & CopyCol).Copy
End With
Set wbk = Workbooks.Open(strFName1)
With wbk.Sheets("MyDate")
Range("A2").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End With
Ens Sub
This copies only D column to A coulmn of another workbook
I want 2 more columns to copied and pasted in another workbook
G column---- C Column
H column---- E Column
Any suggestions
Bookmarks