Short answer is "The field argument".
The long asnwer is:
This bit just defines the table. So, it is applying autofilter to columns A:H down to the last used row in A1. Assuming that A1 has contiguous data down to row 200, the range would be A1:H200. You would need to modify the columns to suit your workbook.
This is the bit that identifies which column to compare values. 3 is the third column of the table defined (A1:H200). If the table was B1:J200 and you wanted to search column C, you would use Field:=2.
This is where you define the variable you want to match. This can actually be fairly complex. You can use wildcards to make a "contains" type of evaluation, or you could do a less than or greater than scenario.
This bit is fairly straight forward in that it deletes the visible rows in the table. One thing to notice, though, is that I started the table at A2, not A1. This is because the header row would be visible, and we don't want to delete that. Also, I don't need to check any columns other than A. If A is visible, then all columns in that row are visible.
This bit just turns Autofilter off for the table.
Bookmarks