title: optimizing looping through rows and columns of an array
body: <p>I have an array of about 400 columns and 30 rows
  I want to go through all the columns and each row in every column, and test cell of each cell for something..like if it's holds a negative number, and if it does I want to copy the cell itself and certain cells above it to another sheet.</p>
  
  <p>I have done this with 2 standard "<code>for-loop</code>", however it takes a lot of time and there are more than 10 different tests for each cell.</p>
  
  <p>I was wondering if anyone knew a more efficient way of doing this, such as using "for each" statements...I've been trying this with no luck -</p>
  
  <pre><code> Set FinalSht = ActiveWorkbook.Worksheets("Final")
      Cnter = FinalSht.Cells(5, FinalSht.Columns.Count).End(xlToRight).Column
      Rowter = FinalSht.Cells(FinalSht.Rows.Count, "B").End(xlUp).Row
  
      Set AnRe = ActiveWorkbook.Worksheets("Anomaly")
      AnRe.Cells.ClearContents
  
      Set SRng = FinalSht.Range(FinalSht.Cells(5, 3), FinalSht.Cells(14, Cnter))
  
      RowCount = 0
      ColCount = 0
  
      For Each RowRng In SRng.Rows
      RowCount = RowCount + 1
  
               For Each ColRng In SRng.Columns
               ColCount = ColCount + 1
               Select Case True
                  Case FinalSht.Cells(RowRng.Rows, ColRng.Columns) &lt; 0
                  With AnRe
                       .Cells(RowCount, ColCount).Value = FinalSht.Cells(RowRng.Rows, ColRng.Columns).Value
                  End With
  
                    End Select
  
                  Next ColRng
  
  
   Next RowRng
  </code></pre>
  
  <p>thanks for any help I can get...</p>