December 4, 2017

How to Copy Column Data into Another Workbook

How to copy column data into another Workbook automatically with VBA. Often we may need to copy and paste data from a worksheet column into another worksheet or into another worksheet in another closed workbook. We can automate the complete process of copying the column data using Visual Basic for Applications or VBA. Watch the training video below to transfer column data quickly and easily into another worksheet:


Watch this video on YouTube.

Here’s the complete VBA code to copy and paste column data from one worksheet to another worksheet in a closed workbook:

Sub copyColumn()
Dim lastrow As Long
lastrow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row
ActiveSheet.Range(“C1:C” & lastrow).Copy
Workbooks.Open Filename:=”C:\Users\takyar\Desktop\test-copy.xlsx”
eColumn = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column
If eColumn >= 1 Then eColumn = eColumn + 1
ActiveSheet.Cells(1, eColumn).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, Skipblanks:=False, Transpose:=False
End Sub

Further reference:

Copy Data Paste another Workbook Transpose Automatically using Excel VBA


2 thoughts on “How to Copy Column Data into Another Workbook

  1. Hi Sir,

    i want to copy multiple columns from one workbook like a,b , e and want to paste in specific cells of another columns like m21:p21,
    how can i paste data into cells of some specific sheet in another workbook?
    i will really appreciate your time to answer my query.

Comments are closed.