Macro statement explanation

October 23, 2011 at 10:15:17
Specs: Windows XP
Im trying to copy some old code from a macro., what does this macro mean in English? Selection.AutoFilter Field:=9, Criteria1:="Yes"

criteria1= automotive

See More: Macro statement explanation

Report •

October 24, 2011 at 12:03:42
Just a posting tip....

The line that you posted is not a macro, but simply a single line from a macro. Your code must have Sub macro_name() and End Sub lines in order to be considered a macro.

In addition, I'm not sure why you have included the string criteria1= automotive in your post or how it relates to your question.

In any case,

Selection.AutoFilter Field:=9, Criteria1:="Yes"

is going to Filter the selected range, returning any Row that contains Yes in Column 9 of the selected Range - not Column 9 (I) of the spreadsheet, but Column 9 as you count the Columns in the selected range from left to right.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question