Hi,
I am trying to import a few columns from one excel spreadsheet to another. Below is the code that I have found on a forum which is working fine. the only problem I am facing is it is importing only one column.can someone please guide how I can edit the code so that I can importing multiple columns
Importing single Column
Sub CopyColumnToWorkbook()
Dim sourceColumn As Range, targetColumn As Range
Set sourceColumn = Workbooks("Source.xlsm").Worksheets("2017"). Columns(“A”)
Set targetColumn = Workbooks("Target.xlsm").Worksheets("Field WH Projections").Columns(“A”)
sourceColumn.Copy Destination:=targetColumn
End
Thanks
I am trying to import a few columns from one excel spreadsheet to another. Below is the code that I have found on a forum which is working fine. the only problem I am facing is it is importing only one column.can someone please guide how I can edit the code so that I can importing multiple columns
Importing single Column
Sub CopyColumnToWorkbook()
Dim sourceColumn As Range, targetColumn As Range
Set sourceColumn = Workbooks("Source.xlsm").Worksheets("2017"). Columns(“A”)
Set targetColumn = Workbooks("Target.xlsm").Worksheets("Field WH Projections").Columns(“A”)
sourceColumn.Copy Destination:=targetColumn
End
Thanks