Hi, I wrote also simple code (not that elegant as jindon's piece), but it took me some time to test it (had some problems with diffrent number of chunks.
Anyway, it is ready so I'll publish it too:
Sub test()
Dim pos1 As Long, pos2 As Long, pos3 As Long, end1 As Long, end2 As Long, end3 As Long
pos1 = 1: pos2 = 1: pos3 = 1
Application.ScreenUpdating = False
Do
end1 = Sheets("Sheet1").Cells(pos1, "A").End(xlDown).Row
end2 = Sheets("Sheet2").Cells(pos2, "A").End(xlDown).Row
With Sheets("Sheet1")
If end1 < Rows.Count Then Range(.Cells(pos1, "A"), .Cells(end1, "A")).Copy Sheets("Sheet3").Cells(pos3, "A")
End With
With Sheets("Sheet2")
end3 = Sheets("Sheet3").Cells(Rows.Count, "A").End(xlUp).Row + 2
If end2 < Rows.Count Then Range(.Cells(pos2, "A"), .Cells(end2, "A")).Copy Sheets("Sheet3").Cells(end3, "A")
End With
With Sheets("Sheet3")
end3 = .Cells(Rows.Count, "A").End(xlUp).Row
Range(.Cells(pos3, "A"), .Cells(end3, "A")).Sort key1:=.Cells(pos3, "A"), order1:=xlAscending, Header:=xlNo
Range(.Cells(pos3, "A"), .Cells(end3, "A")).RemoveDuplicates Columns:=1, Header:=xlNo
pos3 = .Cells(Rows.Count, "A").End(xlUp).Row + 2
End With
If end1 < Rows.Count Then pos1 = end1 + 2
If end2 < Rows.Count Then pos2 = end2 + 2
Loop Until end2 = Rows.Count And end1 = Rows.Count
End Sub
Bookmarks