View Single Post
  #1   Report Post  
bpeltzer
 
Posts: n/a
Default Macro to include contents of cell

If your filtered table starts in, say, cell A10, and your filter criteria in
A1 should be applied to column A in your table, then the VBA would be
something like:
Range("A10").Select
Selection.AutoFilter Field:=1, Criteria1:=Range("A1").Value
--Bruce

"Matt" wrote:

Hi

I want to run a macro that inserts a particular variable value into a custom
filter.
I have a list of 40 names, any of which may appear in cell A1.
I need whatever that name is to be placed into a custom filter to then
display the portfolio of that person.

How do I write the macro so that is filters for the variable name in A1 each
time it changes?

Thanks