Hi,
I have multiple sheets in given workbook and I would like to combine them in one excel sheet. After I combine in one sheet, from the combined sheet I would like to remove the duplicate.
I was able to find macros to combined all in one sheet but i was not able to find macro for removing the duplicates.
Can any one help me out on this. I have searched on previously posted questions, I don't find it.
Here is the Macro for combining multiple sheet in one:
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
=================================================================
Thanks in Advance.
Regards
Anu.
I have multiple sheets in given workbook and I would like to combine them in one excel sheet. After I combine in one sheet, from the combined sheet I would like to remove the duplicate.
I was able to find macros to combined all in one sheet but i was not able to find macro for removing the duplicates.
Can any one help me out on this. I have searched on previously posted questions, I don't find it.
Here is the Macro for combining multiple sheet in one:
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
=================================================================
Thanks in Advance.
Regards
Anu.