So I'm trying to format to all sheets apart from the "Names" sheet. and what I came up with below doesn't seem to be able to loop and detect the sheet "Names". It will try to format "Names" the said sheet is active or it will only apply format a single other sheets when the sheets is active
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Names" Then
Rows("1:1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$Q$19").AutoFilter Field:=4, Criteria1:="="
Rows("2:2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$Q$16").AutoFilter Field:=4
Columns("G:G").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Delete Shift:=xlToLeft
Range("J15").Select
End If
Next ws
I've tried rewriting the codes completely but the same problem persists