Ask a question »

Excel - Copy data from one sheet to another

May 2016

VBA code can be written to copy data from one Excel sheet to another instead of a macro. With a macro, if it is not written correctly, the same sheet will be copied to subsequent new sheets every time the macro is executed. Copying the Excel sheets manually will not be possible if the Excel sheet contained too much data.Writing code in VBA is simple and easy but it is not necessary to write the code from scratch. The code to copy data from one sheet to another can be downloaded legally from many programming resources.VBA code adds greater functionality to the Excel Office Software.


I am new to Macro in Excel and need help writing code to copy data from one sheet to another. I want to copy data from Sheet 1 of spreadsheet A to Sheet 1 of spreadsheet B whenever the former is updated, but without affecting the other sheets in spreadsheet B.


The following code will solve this problem. The sheet will update automatically.

Sub CopyPaste()      
Dim ws As Worksheet      
For Each ws In Worksheets      

If ws.Name <> "Master Sheet" Then      
ws.Application.Run "Macro1"      
End If      
End Sub      

Sub Macro1()      
Sheets("Summary Sheet").Select      
End Sub 


Thanks to iveal for this tip on the forum.

For unlimited offline reading, you can download this article for free in PDF format:

See also

In the same category

Published by aakai1056. - Latest update by Paul Berentzen
This document entitled « Excel - Copy data from one sheet to another » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.