any one correct this code
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheet1.Range("A2:A" & Sheet1.Range("A" & Rows.Count).End(xlUp).Row).Copy _Destination:=Sheet2.Range("A2:A" & Rows.Count).End(xlUp).Offset(1, 0)
Sheet2.Range("A2", Sheet2.Range("A" & Rows.Count).End(xlUp)).RemoveDuplicates 1
End Sub