Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sub MergeSheets()
Dim x As Integer
Dim ws As Worksheet
On Error GoTo ErrHandler
Application.ScreenUpdating = False
x = 1
For Each ws In ThisWorkbook.Sheets
If ws.Name <> "Tong Hop" Then
If x = 1 Then
ws.UsedRange.Copy Sheets("Tong Hop").Range("A1")
lr = Sheets("Tong Hop").UsedRange.Rows.Count
ws.UsedRange.Offset(1).Copy Sheets("Tong Hop").Range("A" & lr + 1)
End If
x = x + 1
End If
Next ws
Debug.Print Err.Description
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.