Sub delRows()
Dim cl As Range
Dim uRng As Range
Dim rng As Range
Dim x As Long
Set uRng = ActiveSheet.UsedRange
For Each cl In uRng
If cl.Value = "0" Or cl.Value = "1" Or cl.Value = "2" Or cl.Value = "3" Then
If x = 0 Then
Set rng = cl
x = 1
Else: Set rng = Union(rng, cl)
End If
End If
Next cl
rng.EntireRow.Delete
End Sub
这是我写的当前宏...它在整个页面中搜索值; 0,1,2或3,然后删除该行。没关系。现在这个功能它工作得很好......我有问题改变它只是扫描单个列的这些值,然后删除该行..我不断收到错误。假设我想让它只在工作表中的列“J”中搜索?有谁知道如何解决这个问题?Microsoft Excel 2010:帮助宏制作工作
工作得很好,非常感谢! – Leaum 2011-05-19 19:44:40