No Problem, I have it working but the code is very ugly.
Its essentially reiterating the code every time instead of being in a loop
Sheets("100%").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets(">75%").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets(">50%").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets(">25%").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets(">10%").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets("Court Cases_Zero Arrs").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets("Zero Net Rent").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets("New Tenancies").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets("All Cases").Select
Selection.AutoFilter Field:=1, Criteria1:="Patch 3"
Sheets("100%").Select
'At the end, first tab is displayed again prior to saving
'Will save the current "Active workbook" as name specified plus todays date.
ActiveWorkbook.SaveAs Filename:= _
"\\**********FolderDirectory****\Patch_3 " & Format(Now, "dd mm yyyy") & ".xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
What I'd like if possible is to contain this in a loop. Is it possible to create an array/loop that will cycle through each one? I can't expalin so well but essentaially
>
for int i=0; i<number of patches; i++{
above code
Save as filename patch+(i);
}
Any help would be greatly appreaciated, many thanks.
Bookmarks