Rather than looking for Sheet1 or Sample, look for everything else...Dim wSht As WorksheetFor Each wSht In WorksheetsIf wSht.Name <> "Sheet1" and wSht.Name <> "Sample" Then-'Code for rest of sheetsEnd ifNext