ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

VBAµ{¦¡¬O§_¥i¥H²¤Æ(§R°£AÄæ«ü©w¦r¤¸)

VBAµ{¦¡¬O§_¥i¥H²¤Æ(§R°£AÄæ«ü©w¦r¤¸)

¿Ë·Rªº¥ý¶i,
§ÚªºVBA»yªk¦p¤U¡A¬O§_¥i¥H²¤Æ¡A³Ì¥D­n³£¬O¦bAÄæ¦ì¦³¥X²{ÃöÁä¦r­n§R°£¥H¤Î¥u­n¬OªÅ¥Õ´N§R°£
*ªÅ¥Õ¡B¤½¥q¡B³æ§O:¡B¤é´Á*¡B²£«~¤jÃþ:¡B®Ö­ã*¡B¦X­p*¡BÁ`­p*



Sub Step1()
On Error Resume Next
[A:A].SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End Sub

Sub Step2()
Dim yy
yy = "¤½¥q"
For i = [a65536].End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountIf(Rows(i), yy) > 0 Then Rows(i).Delete
Next i
End Sub

Sub Step3()
'AÄd¤U²¾°£"³æ§O:"
Dim yy
yy = "³æ§O:"
For i = [a65536].End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountIf(Rows(i), yy) > 0 Then Rows(i).Delete
Next i
End Sub

Sub Step4()
'AÄd¤U²¾°£"¤é´Á*"
Set a = Columns("A").Find("¤é´Á*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("¤é´Á*")
Loop
End Sub


Sub Step5()
'AÄd¤U²¾°£"²£«~¤jÃþ:"
Dim yy
yy = "²£«~¤jÃþ:"
For i = [a65536].End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountIf(Rows(i), yy) > 0 Then Rows(i).Delete
Next i
End Sub

Sub Step6()
'AÄd¤U²¾°£"®Ö­ã*"
Set a = Columns("A").Find("®Ö­ã*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("®Ö­ã*")
Loop
End Sub

Sub Step7()
'AÄd¤U²¾°£"¦X­p*"
Set a = Columns("A").Find("¦X­p*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("¦X­p*")
Loop
End Sub

Sub Step8()
'AÄd¤U²¾°£"Á`­p*"
Set a = Columns("A").Find("Á`­p*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("Á`­p*")
Loop
End Sub
Just do it.

¦^´_ 1# jsc0518
  1. Sub zz()
  2. Dim reg As Object, a, rng As Range, z&
  3. a = Range("a1:a" & Cells(Rows.Count, 1).End(3).Row).Value
  4. z = UBound(a)
  5. Set rng = Rows(z + 1)
  6. Set reg = CreateObject("vbscript.regexp")
  7. With reg
  8.     .Pattern = "ªÅ¥Õ|¤½¥q|³æ§O:|¤é´Á|²£«~¤jÃþ:|®Ö­ã|¦X­p|Á`­p"
  9.     For i = 1 To z
  10.         If Len(a(i, 1)) = 0 Or .test(a(i, 1)) Then
  11.             Set rng = Union(rng, Rows(i))
  12.         End If
  13.     Next
  14. End With
  15. rng.Delete
  16. Set rng = Nothing
  17. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# ikboy
¤j·P¿E¡A´ú¸ÕOK
ÁÂÁ§AªºÀ°¦£!
Just do it.

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD