Select data in filtered list

S

Stephen Rainey

Hi,
I have a filtered list that I wish to copy using VBA. Each time the
filter is applied, the size of the list may vary.
It is simple to cut&paste, however my objective is to write a macro to
automate this task as it is repeated hundred/thousands of times.

So, can someone please suggest how to "select" the contents of the filtered
list in a macro ?
 
J

Jim May

I use this to Send the Current Auto-Filtered Data to a new sheet:


Sub DumpAutoFilterToNewSheet()
Dim ws As Worksheet
Dim ws1 As Worksheet
Set ws = ActiveSheet
Set ws1 = Worksheets.Add
ws.Activate
ws.AutoFilter.Range.Copy _
Destination:=ws1.Cells(1, 1)
End Sub

Hope this Helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top