Microsoft Office Tutorials and References
In Depth Information
Deleting Rows Based on Criteria
There are three variables that can be changed in this code:
Rng
The range that will be used in the code. Uncomment the
line (remove the apostrophe) to use the selection if that is
what is desired.
¾
WhichColumn The column that will be checked for the condition. 1 equals
the first column in the range, 2 the second, etc. This can be
either hard-coded or input on the sheet by the user. The
example file is set to use hard-coded values. Uncomment
the line (remove the apostrophe) to use the user input.
Comment out the hard-coded line (add an apostrophe to the
left).
¾
Exl
TheCondition
The condition that the cells must meet to delete the rows.
This can be either hard-coded or input on the sheet by the
user. The example file is set to use one of three hard-coded
values. Uncomment the appropriate line (remove the
apostrophe) to use the other hard-coded values or the user
input method. Comment out the hard-coded line (add an
apostrophe to the left).
¾
Note: This macro removes any previous filters that may exist on the worksheet.
Search JabSto ::




Custom Search