Microsoft Office Tutorials and References
In Depth Information
Deleting Rows Based on Criteria
' * * * * *¶
Sub Auto_Open()¶
'Enable when the workbook is opened¶
End Sub¶
In this macro, the password used to protect the sheet (Pwd) can be changed.
The worksheet in which it is run can also be changed in the code. The line to
uncomment if using Outlines is indicated in the code as well. If you plan to
leave the worksheet protected, it’s a good idea to call this macro from the
Workbook_Open event of the workbook, to make sure that the users have
AutoFilter and/or Outline available each time they use the workbook.
Deleting Rows Based on Criteria
With this macro, you can delete all the records (rows) that meet certain
criteria; for example, column A equals 0.
Example file:
Scenario: When handling big files with a lot of records,
finding a way to delete all the rows that match a given
condition can be a cumbersome process. This macro is
designed to facilitate this task, by setting a column and a
condition to match in order to delete the rows.
View the Appendix to learn how to store this procedure
in a Standard module.
Search JabSto ::

Custom Search