Hello Everyone,
Using Advanced Filter
How would you make the CopyToRange dynamic?
Per the code below it works fine, but instead of a static "J7:CF7" I need CF to be able to expand to the furthest right column in Row 7 that holds a value.
For instance sometimes it is J7:CF7, othertimes it is J7:FD7
Code
Sheet19.Range("F7").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheet16.Range("J1:AJ2"), CopyToRange:=Sheet16.Range("J7:CF7"), Unique:=False
Thanks for any help with this