我在想我能不能加快这个宏的速度?
`Columns("O:O").Replace What:="0", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("N:O").SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp`
我只想让它运行到第26行,但当我试图将其更改为O:O26
或N2:O26
时,我得到错误“400”或“类型不匹配”。
先谢谢你。
1条答案
按热度按时间o7jaxewo1#
删除行(单元格)
"开始"
备选案文1
O
中的空单元格行,无论列N
中有什么。备选案文2
N
ANDO
列中的空单元格行。选项3错误
N
ORO
中的空单元格行(错误)。我标记错误,因为它将单独删除每列中的单元格,我认为这是非常不可能的,虽然这是一个有效的选项。备选案文3
N
ORO
列中的空单元格行。提示
Select
而不是Delete
。当然,您需要记住,工作表需要处于活动状态才能在此简单表单中使用它。您可以使用以下方法改进它: