'來源:http://club.excelhome.net/viewthread.php?tid=265056&extra=&highlight=%C7%B3%CC%B8&page=2
'功能:A欄有重覆資料,執行後將不重覆資料列於同表 D欄。
Dim r As Range, c As Range
Set r = Sheets("sheet1").[a:a].SpecialCells(xlCellTypeConstants, 23)
With CreateObject("scripting.dictionary")
For Each c In r
If Not .exists(c.Value) Then .Add c.Value, ""
Next
Sheets("sheet1").[E1].Resize(.Count, 1) = WorksheetFunction.Transpose(.keys)
End With
End Sub
發佈文章
沒有留言:
張貼留言