Need autofilter and data extracting help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to autofilter and then seperate data brought into a spreadsheet
from an external text file. I need to write a macro that allows me to
autofilter and move (not just copy) each set of similar data from one sheet
to a seperate, new sheet in the workbook.

Thanks for your assistance.
 
Here is an example of setting up a filter and moving data to another
spreadsheet:
The filter is set up on column H only, but you can change it to as many a
columns as required. The Field is based on the column you want to filter by;
the criteria is selfexplanatory, you can change it to a variable so it
becomes more dynamic or hardcoded if it won't change.
Application.Worksheets("Sheet1").Select
Columns("H:H").AutoFilter Field:=1, Criteria1:="ENT"
Range("A:H").SpecialCells(xlCellTypeVisible).Cut
Destination:=Worksheets("Sheet2").Range("A1")

If this posting was helpful, please click on the Yes button.
 

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

Back
Top