I found a snippet of VBA for deleting rows in which the column value contains text.
It seems to work much faster than a loop statement. I looked online to figure out how Specifically xlCellTypeConstants, 22
works.
[D:D].SpecialCells(xlCellTypeConstants, 22).EntireRow.Delete
You're providing the first argument as xlCellTypeConstants
, so that means the second parameter can be a bitwise combination of:
xlNumbers = 1
xlTextValues = 2
xlLogical = 4
xlErrors = 16
In your case, you're using a hard-coded number of 22, which is the bitwise equivalent of xlErrors Or xlLogical Or xlTextValues
See this article (Archive) for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With