【技巧1001-11】-Excel删除重复值,我用了7种方法
方法1:自带去重法
方法2:高级筛选法
方法3:透视表法
方法4:函数法
=INDEX(A:A,MIN(IF(COUNTIF($E$1:E4,$A$2:$A$11),65536,ROW($A$2:$A$11))))&""
方法5:SQL法
方法6:VBA法
'作者:Excel办公实战
Sub distinct_data()
Dim d As Object, arr, i As Integer
Set d = CreateObject("scripting.dictionary")
arr = Range("A1").CurrentRegion.Value
For i = 2 To UBound(arr)
d(arr(i, 1)) = ""
Next
[C1] = "姓名"
Range("C2").Resize(d.Count, 1) = Application.Transpose(d.keys())
End Sub
赞 (0)