A few words of thanks would be greatly appreciated.

Excel - Copy data from one sheet to another

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.

A few words of thanks would be greatly appreciated.

Ask a question
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team

Published by . Latest update on by Paul Berentzen.

This document, titled "Excel - Copy data from one sheet to another," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).

1 Comment