April 4, 2016

Copy Paste Data in Excel with VBA

In the last few days there have been many questions about copying and pasting data in Excel with VBA. Many people wish to copy and paste non-contiguous data or copy and paste data while transposing the data. Of course, we can also copy and paste data from one workbook to another automatically. Watch the training video:

Watch this video on YouTube.

The complete VBA code is given below:

Copy and Paste Data with Transpose:

Sub copytranspose()
Sheet3.Range(“A2”).PasteSpecial , Transpose:=True
End Sub

Copy and Paste non-contiguous date to another worksheet:

Sub mycopypaste()
Range(“A2,A4,A7”).Copy Sheet2.Range(“A2”)
End Sub

Copy and Paste data:

Sub copypaste()
Sheet1.Range(“A2:A4”).Copy Range(“E2”)
End Sub

Step by step VBA code to copy and paste data:

Sub copyrange()
Application.CutCopyMode = False
End Sub


One thought on “Copy Paste Data in Excel with VBA

Comments are closed.