How to Copy Between Sheets in Excel & VBA

Written by jaime avelar | 13/05/2017
How to Copy Between Sheets in Excel & VBA
User the system clipboard to copy data in Excel. (Comstock/Comstock/Getty Images)

Being able to copy data from one worksheet to another in Excel saves the user time since he doesn't have to copy it manually. The best way to copy data between sheets is to use the system clipboard. In VBA, you can use the "Select" property to select a worksheet and you can use the "Selection" object to copy data to the system clipboard. The "Paste" method pastes the contents of the clipboard onto the sheet that's currently selected.

Click the "Sheet1" tab and type "data in sheet 1" in A1. Click "Sheet2" and type "data in sheet 2" in A1.

Click the "Developer" tab, click "Visual Basic," and click the "Insert" menu. Click "Module" to insert a new code module.

Create a new sub procedure.

Private Sub copyDataBetweenSheets()

Add the following code to select the Sheet1 and copy the data in A1:

Add the following code to select Sheet2 and paste the data copied from Sheet1:

Select the data in cell A1 and copy it by adding the following code:

Paste the data you copied from Sheet2 by adding the following code:

End the procedure by adding "End Sub." Press "F5" to execute the sub procedure.

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.