title: Search through selected cells and hide them if they contain a letter
body: <p>I want to loop through cells and look for letters. If they contain the letter hide the cell with NumberFormat. This works but how do I make this loop toggeable so i can hide/unhide.    </p>
  
  <pre><code>Private Sub CommandButton1_Click()
  Dim rng As Range, cell As Range
  Set rng = Range("D5:F35,D43:F73,J5:L35,J43:L73,P5:R35,P43:R73,V5:X35,V43:X73,AB5:AD35,AB43:AD73,AH5:AJ35,AH43:AJ73")
  For Each cell In rng
          If InStr(1, cell.Value, "A") &gt; 0 Then cell.NumberFormat = ";;;"
          If InStr(1, cell.Value, "B") &gt; 0 Then cell.NumberFormat = ";;;"
          If InStr(1, cell.Value, "C") &gt; 0 Then cell.NumberFormat = ";;;"
          If InStr(1, cell.Value, "D") &gt; 0 Then cell.NumberFormat = ";;;"
          If InStr(1, cell.Value, "F") &gt; 0 Then cell.NumberFormat = ";;;"
  Next cell
  End Sub
  </code></pre>