Created
June 25, 2017 04:47
-
-
Save ndthanh/16a48e726b788528c31a17484bc7ee1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Combine() | |
Dim J As Integer | |
On Error Resume Next | |
Sheets(1).Select | |
Worksheets.Add | |
Sheets(1).Name = "Combined" | |
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) | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment