CEN7272
Technical User
- Jan 28, 2005
- 20
I'm not new to Excel but just starting to learn about VBA. I tried recording a macro but it isn't working and I don't know enough about the expressions to correct it. I need to copy the contents of a cell and paste them into the custom search of the autofilter as a "contains" search.
Here is the code for the recorded macro
I think that I need 'Criteria1' to reference to a cell but I don't know how to do that.
Any help or suggestions would be apprecitate,
Clay
Here is the code for the recorded macro
Code:
Sub LocationAutoFilter()
Selection.Copy
Selection.AutoFilter Field:=6, Criteria1:="=Buf", Operator:=xlAnd"
End Sub
I think that I need 'Criteria1' to reference to a cell but I don't know how to do that.
Any help or suggestions would be apprecitate,
Clay