Hi all,
So I have a few tabs with changing names, that sometimes are there and others there aren't. For example. I will always have a "Sheet1" then after that they may not be there, "Sheet1 (2)", "Sheet1 (3)", etc. I need help writing a macro that will copy the data from "Sheet1" into Cell A1, on a sheet called Merge. Then "Sheet1 (2)", will be copied into Merge, except at the bottom of the data from "Sheet1".
I got this to work for copying sheet1, but not the others.
Thanks in advance
So I have a few tabs with changing names, that sometimes are there and others there aren't. For example. I will always have a "Sheet1" then after that they may not be there, "Sheet1 (2)", "Sheet1 (3)", etc. I need help writing a macro that will copy the data from "Sheet1" into Cell A1, on a sheet called Merge. Then "Sheet1 (2)", will be copied into Merge, except at the bottom of the data from "Sheet1".
Code:
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name Like "*(*)" Then Range("A:AE").Copy Destination:=Worksheets("Merged").Range("A1")
Next ws
Sheets("Merged").Select
With ActiveSheet
LastRowColumnA = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
Thanks in advance