Assuming you only need to autofilter the name field on a sheet and that field is in the same column on all sheets, try
![]()
For Each sh In ActiveWorkbook.Sheets If sh.Name <> mainsh.Name Then With sh.UsedRange .AutoFilter 4, "*" & search_val & "*" .Offset(1, 1).Resize(, 11).Copy mainsh.Cells(Rows.Count, 2).End(xlUp)(2) .AutoFilter End With End If Next
Bookmarks