- ©«¤l
- 6
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 8
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 10
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2018-9-4
- ³Ì«áµn¿ý
- 2018-10-22
|
[µo°Ý] Excel2003 remove duplicates¬Û®e©Ê°ÝÃD
¦U¦ì¦n
¥Ø«e¤u§@¥æ±µ®É¡Aµo²{Â÷¾¦P¨Æ¦æ±¡¨Ï¥ÎVBA¬ö¿ý¡A¶i¦Ó¶}©lºN¯Á
¦]Ó¤H¹q¸£ª©¥»»Ýn§âoffice2013ªºVBA§ï¦¨office2003ªºª©¥»
¦b¦¬¨ú¦æ±¡®É·|¨C¤p®É§R°£«½Æªº¸ê®Æ ¡A¦¹¤º®e¼g¦b¼Ò²Õ¤¤¡A°õ¦æ®É¦b«ü©wªº32Ó¤u§@ªí§R°£
¦b§ï¼g®É¹J¨ìremove duplicates¬Û®e©Êªº°ÝÃD¡A
¦³°Ñ¦Òª©¤Wªº¤å³¹¹Á¸Õ§ï¼g¦¨2003ªºª©¥»¦b¤u§@ªí¤º¥i¥H¥¿±`°õ¦æ¡A¦ý¦b¼Ò²Õ¤¤¦³®É·|¸õ¥X¿ù»~
¦A«×°Ñ¦Òºô¸ôªº¸ê®Æ«á §ï¼g¦¨¤U±ªº¤º®e§Y¥i¦b¼Ò²Õ¤¤¥¿±`°õ¦æ
¦ý°õ¦æ®Éµo²{°£¤F®Ä²vÅÜ®t¥~¡A¸ê®Æ¶qÃe¤j®ÉÁÙ¥i¯à·|·í¾÷QQ
·Q½Ð°Ý¤j®a¹ï©óRemoveDuplicates§ï¼g¬°2003ª©¥i¨Ï¥Îªºª©¥»®É¡A¬O§_¦³¸û¦nªº¼gªk©O?
ÁÂÁ¤j®a!!
ì©loffice2013¥Îªk¬°
------------------------------------------------------------
Sub delete()
For i = 2 To 33
Sheet(i).Range("B4:AG65536").RemoveDuplicates Columns:=Array(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33), Header:=xlNO
Next i
End Sub
------------------------------------------------------------
¥Ø«e§Ú°Ñ¦Òºô¸ô¸ê®Æ§ï¼goffice2003¬°
------------------------------------
Sub delete()
For i = 2 To 33
Dim r As Range, Rng As Range
Sheets(i).Select
With Sheets(i).UsedRange
.Columns("B:AG").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Dim g%
Application.ScreenUpdating = False
For g = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Row - 1 To ActiveSheet.UsedRange.Row Step -1
If Rows(g).Hidden = True Then
Rows(g).EntireRow.delete
End If
Next
Application.ScreenUpdating = True
End With
Next i
End Sub
------------------------------------------------------------ |
|