Sub Step1()
On Error Resume Next
[A:A].SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
Sub Step2()
Dim yy
yy = "公司"
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攔下移除"單別:"
Dim yy
yy = "單別:"
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攔下移除"日期*"
Set a = Columns("A").Find("日期*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("日期*")
Loop
End Sub
Sub Step5()
'A攔下移除"產品大類:"
Dim yy
yy = "產品大類:"
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攔下移除"核准*"
Set a = Columns("A").Find("核准*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("核准*")
Loop
End Sub
Sub Step7()
'A攔下移除"合計*"
Set a = Columns("A").Find("合計*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("合計*")
Loop
End Sub
Sub Step8()
'A攔下移除"總計*"
Set a = Columns("A").Find("總計*")
Do Until a Is Nothing
a.EntireRow.Delete
Set a = Columns("A").Find("總計*")
Loop
End Sub作者: ikboy 時間: 2017-11-14 14:34