hello guys
I have this code it supposes data of column b in sheet1 to column e in sheet2 without any duplicated , but it doesn't happen any thing
so I appreciate if any body provide advice how can fix it .
thanks
I have this code it supposes data of column b in sheet1 to column e in sheet2 without any duplicated , but it doesn't happen any thing
so I appreciate if any body provide advice how can fix it .
VBA Code:
Sub CopyUnique()
Dim s1 As Worksheet, FirstEmptyRow As Long, expCol As Long
Set s1 = ActiveSheet
With Sheets("sheet1")
.Range("b:b").Name = "code1"
expCol = .Range("code1").Column
FirstEmptyRow = .Cells(.Rows.Count, expCol).End(xlUp).Row + 1
s1.Range("e2:e100").Copy .Cells(FirstEmptyRow, expCol)
.Range("code1").RemoveDuplicates Columns:=1, Header:=xlNo
End With
End Sub