Hello,
I am very new and inexperienced at VBA & thank you to anyone and everyone for advice with this problem.
I worked on this macro, but I have a few challenges I'm hoping someone here can help with.
How do I tell he loop to only go though so many worksheets, I have pivot tables at the back of the workbook I don't want or need copied.
Is it possible to start with the first sheet in the workbook end the loop when it 'finds' the "Master" tab so I can keep my support files behind and have them not copied?
Sub CombineData()
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Master" Then
ws.Range("A17:N154").Copy
Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Offset(1).PasteSpecial xlPasteValues
End If
Next
Application.ScreenUpdating = True
End Sub
I am very new and inexperienced at VBA & thank you to anyone and everyone for advice with this problem.
I worked on this macro, but I have a few challenges I'm hoping someone here can help with.
How do I tell he loop to only go though so many worksheets, I have pivot tables at the back of the workbook I don't want or need copied.
Is it possible to start with the first sheet in the workbook end the loop when it 'finds' the "Master" tab so I can keep my support files behind and have them not copied?
Sub CombineData()
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Master" Then
ws.Range("A17:N154").Copy
Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Offset(1).PasteSpecial xlPasteValues
End If
Next
Application.ScreenUpdating = True
End Sub