Dear All,
I currently use coding below to copy all the data using an autofilter,( I have the coding copied 10 times for each different type) The values in column E (filter option 5) can change all the time, and each time they change I have to make extra coding for each item, is there a way to filter out and copy every instance that appears in colum E, and perform the same task, what the coding currently does is filter by the type, and then copies the data to a new file - new file is created at the start of the routine and adds 10 sheets,each filter type goes on to a different sheet and then the new file is saved to disk. IS it possible to just filter each different option in the column and not specify the type you wish to filter, as I have the same coding for 3 different files and I have to change all 3 files at the moment, Hope I have made sense, and I hope someone can help with this.
The Coding to filter out the data
Selection.AutoFilter Field:=5, Criteria1:= _
"Internal Escalated To Mail Team Open"
Range("A:d,H:J"
.Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.ActivatePrevious
Sheets("Sheet3"
.Select
Sheets("Sheet3"
.Name = "Mail Team"
ActiveSheet.Paste
Sheets("Call Back"
.Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Team"
.Select
Range("H7"
.Select
ActiveSheet.Paste
Columns("E:E"
.EntireColumn.AutoFit
Range("E9"
.Select
Sheets("Sheet4"
.Select
ActiveWindow.ActivateNext
Any help will be greatly appreciated.
Thanks
I currently use coding below to copy all the data using an autofilter,( I have the coding copied 10 times for each different type) The values in column E (filter option 5) can change all the time, and each time they change I have to make extra coding for each item, is there a way to filter out and copy every instance that appears in colum E, and perform the same task, what the coding currently does is filter by the type, and then copies the data to a new file - new file is created at the start of the routine and adds 10 sheets,each filter type goes on to a different sheet and then the new file is saved to disk. IS it possible to just filter each different option in the column and not specify the type you wish to filter, as I have the same coding for 3 different files and I have to change all 3 files at the moment, Hope I have made sense, and I hope someone can help with this.
The Coding to filter out the data
Selection.AutoFilter Field:=5, Criteria1:= _
"Internal Escalated To Mail Team Open"
Range("A:d,H:J"
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.ActivatePrevious
Sheets("Sheet3"
Sheets("Sheet3"
ActiveSheet.Paste
Sheets("Call Back"
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Team"
Range("H7"
ActiveSheet.Paste
Columns("E:E"
Range("E9"
Sheets("Sheet4"
ActiveWindow.ActivateNext
Any help will be greatly appreciated.
Thanks