ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy from multiple worksheets (https://www.excelbanter.com/excel-programming/378846-re-copy-multiple-worksheets.html)

Otto Moehrbach

Copy from multiple worksheets
 
Les
The following macro is one way. Note that the new sheet must be the active
sheet. I assumed the name of the new sheet is "New". That name is in the
macro. Change that as you wish. HTH Otto
Sub CopyA1()
Dim ws As Worksheet
Dim Dest As Range
Set Dest = Range("A" & Rows.Count).End(xlUp).Offset(1)
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = "New" Then GoTo NextSheet
With ws
.Range("A1").Copy Dest
Set Dest = Dest.Offset(1)
End With
NextSheet:
Next ws
End Sub
"Les" wrote in message
...
Can anyone help please?

I'm trying to create a macro to copy the contents of cell 'A1' from each
worksheet and paste them into a list in a new sheet.

Regards

Les.






All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com