|
- Sub 提取不重复()
- Dim d, i&, arr, t
- arr = [a1].CurrentRegion
- Set d = CreateObject("scripting.dictionary")
- For i = 2 To UBound(arr)
- d(arr(i, 5) & "") = Range(Cells(i, 1), Cells(i, 16))
- Next
- t = d.items
- With Sheets(2)
- .Cells.ClearContents
- .[a1].Resize(1, 16) = Application.Index(arr, 1)
- .[a2].Resize(d.Count, 16) = Application.Transpose(Application.Transpose(t))
- .Activate
- End With
- End Sub
复制代码 |
|