ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need autofilter and data extracting help (https://www.excelbanter.com/excel-programming/395695-need-autofilter-data-extracting-help.html)

Shredda

Need autofilter and data extracting help
 
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.

Michael

Need autofilter and data extracting help
 
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.




"Shredda" wrote:

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.



All times are GMT +1. The time now is 03:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com