Hi,
I know the statement .SpecialCells(xlCellTypeBlanks).EntireRow.Delete is quite useful as you try to remove entire rows with blank cells. But what if I need to remove rows with zeros? I know we don't have a valid statement like .SpecialCells(xlCellTypeZeros).EntireRow.Delete. Can we create one? What if I want to remove rows with a number like "999" or "777"?
Can we set up a Class module to make those statements valid? I played with Class module before but nothing serious.
Btw, I don't want to do something like the following:
Sub test()
For Each c In Selection
If c.Value = "999" Then c.EntireRow.Delete
Next
End Sub
If I have half-million records, it will take forever to get the job done.
Thanks in advance.
I know the statement .SpecialCells(xlCellTypeBlanks).EntireRow.Delete is quite useful as you try to remove entire rows with blank cells. But what if I need to remove rows with zeros? I know we don't have a valid statement like .SpecialCells(xlCellTypeZeros).EntireRow.Delete. Can we create one? What if I want to remove rows with a number like "999" or "777"?
Can we set up a Class module to make those statements valid? I played with Class module before but nothing serious.
Btw, I don't want to do something like the following:
Sub test()
For Each c In Selection
If c.Value = "999" Then c.EntireRow.Delete
Next
End Sub
If I have half-million records, it will take forever to get the job done.
Thanks in advance.