relative destination for advance filter results

  • Thread starter Thread starter davechev
  • Start date Start date
D

davechev

I have the following macro to perform a filter. I would like to substitute
the cell
address contained in cell "G1" (which changes) for the destination address,
which
is now "G3".

Range("g3:k3500").Select
Selection.ClearContents
Range("G1").Select
Sheets("CVO data").Range("H1:L3000").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("I1:I2"), CopyToRange:=Range("G3"), Unique:=True


Can this be done?
 
Do you mean that the destination cell you want to copy the filtered results
to is the content of cell G1? I so:

.... CopyToRange:=Range(Range("G1").Text), ...

If this is the answer please remember to click the button below...
 
Back
Top