如果楼主习惯这样的话,改成不等于就好了
sub 删除()
application.screenupdating=false
for i=range("a65536").end(3).row to 1 step -1
if cells(i,2)<>"" then
rows(i).delete
end if
next
applicationlscreenupdating=true
end sub
还可以用定位操作
Sub test()
Columns("B:B").SpecialCells(xlCellTypeConstants, 23).EntireRow.Delete
End Sub
如果楼主习惯这样的话,改成不等于就好了
sub 删除()
application.screenupdating=false
for i=range("a65536").end(3).row to 1 step -1
if cells(i,2)<>"" then
rows(i).delete
end if
next
applicationlscreenupdating=true
end sub
还可以用定位操作
Sub test()
Columns("B:B").SpecialCells(xlCellTypeConstants, 23).EntireRow.Delete
End Sub