my macro is for merging multiple sheets in the file but it is merging menu sheet as well which should not merge.
Note: [sheet name is "menu" which should not merge]
How to stop merging specific sheet
Here is my coding:
Appreciate your help!
Note: [sheet name is "menu" which should not merge]
How to stop merging specific sheet
Here is my coding:
VBA Code:
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Pending"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
ThisWorkbook.Sheets("Pending").Range("A1").Value = "Vam"
ThisWorkbook.Sheets("Pending").Select
For Each sheet In ThisWorkbook.Worksheets
If sheet.Name <> ThisWorkbook.ActiveSheet.Name Then
sheet.Visible = xlSheetHidden
End If
Next sheet
Appreciate your help!