Yeah, I thought maybe you wanted to do this with one criteria.
To know which criteria to look for I created a sheet "Filterlist" (create this sheet in your original file "arretrati.xlsx"). On this sheet I used column A to put the criteria's. So A1 = 0001, A2 = 0002 and so on.
Then I run the code below to:
- filter data based on the criteria's found in the "Filterlist" Sheet.
- copy/paste filter result in new workbook.
- save workbook as criteria's name and close workbook.
Try it and see if it yields the desired result.
Dim x As Integer
Dim sValue As String
x = 1
sValue = Sheets("Filterlist").Cells(x, 1)
Cells.AutoFilter Field:=6, Criteria1:=sValue
ActiveWorkbook.SaveAs ("C:\MyDocuments\" & sValue & ".xls") 'Make sure both filepath and extention are correct
x = x + 1
Loop Until Sheets("Filterlist").Cells(x, 1) = vbNullString