title: Handling `Run-time error 1004: No cells were found` when copying filtered table cells
body: <p>I have a procedure to copy specified cells of a table which are identified in 3 loops.  Sometimes there wouldn't be any data and that's not a problem,
  but I'm getting <code>Run-time error '1004': No cells were found.</code> which prevents the code from going to the next loop.<br>
  I had tried <code>On Error Resume Next</code> but I will not get my response from the code with that.  Maybe there are more errors further and I won't see them because of <code>Resume Next</code>.  </p>
  
  <p>Here is my code:</p>
  
  <pre><code>If Sheets("hour report").Range("U1") = 1 Then
      For i = 1 To k3
          For n = 1 To k1
              Sheets("Sheet1").ListObjects("Table1").Range.AutoFilter Field:=1, _
                  Criteria1:=Sheets("hour report").Range("B" &amp; i + 1)
              Sheets("Sheet1").ListObjects("Table1").Range.AutoFilter Field:=2, _
                  Criteria1:=Sheets("hour report").Cells(1, n + 2)
  
              On Error Resume Next
              Range("Table1[f1]").SpecialCells(xlCellTypeVisible).Copy
              Sheets("hour report").Activate
              Cells(i + 1, n + 2).Select
              ActiveSheet.Paste
          Next n
      Next i
  End If
  </code></pre>