title: Loop all worksheets without three specific sheets
body: <p>This code doesn't loop from one worksheet to another.</p>
  <p>The idea is to hide all rows which don't contain &quot;X&quot; in column A for all worksheets without three specified worksheets.</p>
  <pre class="lang-vb prettyprint-override"><code>Option Explicit
  Sub test()
  
  Dim ws As Worksheet
  Dim C As Range
  
  For Each ws In ThisWorkbook.Worksheets
  
      If ws.Name &lt;&gt; &quot;Übersicht&quot; Or ws.Name &lt;&gt; &quot;Definitionen&quot; Or ws.Name &lt;&gt; &quot;Abkürzungen&quot; Then
     
          For Each C In Range(&quot;A6:A2000&quot;).Cells
              If C.Value = &quot;&quot; Then
                  C.EntireRow.Hidden = True
              Else
                  C.EntireRow.Hidden = False
              End If
          Next C
      
      Else
      End If
     
  Next ws
   
  End Sub
  </code></pre>