- ©«¤l
- 154
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 200
- ÂI¦W
- 1
- §@·~¨t²Î
- windwos 7
- ³nÅ骩¥»
- 64bit
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-5-29
- ³Ì«áµn¿ý
- 2025-1-1
|
¥»©«³Ì«á¥Ñ quickfixer ©ó 2020-12-10 09:54 ½s¿è
¦^´_ 7# lilizzzz
²q´ú¥i¯à¬O¸ê®Æ¤Ó¦h,¥Î¦r¦ê³B²zªø«×¤Óªø
§ï¥Îrange¶°¦X¨Ó§R,½Ð´ú¸Õ
Sub test()
Dim dr As Range
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.EnableEvents = False
Sheets("¤u§@ªí1").Select
Range("A2").Select
Set dic = CreateObject("scripting.dictionary")
For i = Range("A2000").End(3).Row To 1 Step -1
If dic.exists(Cells(i, "A").Value) Then
If dr Is Nothing Then
Set dr = Rows(i)
Else
Set dr = Union(dr, Rows(i))
End If
Else
dic(Cells(i, "A").Value) = ""
End If
Next i
dr.EntireRow.Delete
Set dr = Nothing
Set dic = Nothing
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.DisplayStatusBar = True
Application.EnableEvents = True
End Sub |
|