回復 1#av8d
Dim Rng As Range, Ar, i%, Msg As Boolean
Set Rng = [C1:C10]
Ar = Application.Transpose(Rng)
For i = UBound(Ar) To 1 Step -1
If Application.CountIf(Rng, "=" & Ar(i)) > 1 Then
Rng(i) = ""
Msg = True '輔助判斷: 有一個空白以上
End If
Next '
''''''''''上面程式碼 將重複資料的位置為空白 ''''''''''''''''''''''''
If Msg Then Rng.SpecialCells(xlCellTypeBlanks).Delete xlUp '空白位置刪除的動作作者: av8d 時間: 2012-2-23 16:03