I'm trying to combine multiple sheets to one sheet and i used the following VBA code:
Sub Combine()
Dim J As Integer
Dim s As Worksheet
On Error Resume Next
Sheets("Operational").Activate
Range("A1:A2").EntireRow.Select
Selection.Copy Destination:=Sheets("Combined").Range("A1:A2")
For Each s In ActiveWorkbook.Sheets
If s.Name <> "Combined" And _
s.Name <> "Probability & Impact" And _
s.Name <> "Escalation Criteria" And _
s.Name <> "Application list" And _
s.Name <> "Dashboard" Then
Application.GoTo Sheets(s.Name).[a1]
Selection.CurrentRegion.Select
' Don't copy the headings
Selection.Offset(2, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets("Combined"). _
Cells(Rows.Count, 1).End(xlUp)(2)
End If
Next
Sheets("Combined").Activate
End Sub
The file contains many tabs and i need only to combine 4 sheet to one called (Combain). The problem is the last sheet was copied three time. is any solution for that?