title: Why is this loop selecting multiple cells with the Areas function?
body: <p>I have this loop to select the items in a column in a cell by cell basis, and test each against the previous. Every once in a while, maybe 2 to 4 times in 100 loops, Areas. selects two cells, and the code throws an error, type mismatch, since it cannot compare value of 2 cells. Why is this happening?</p>
  
  <p>I have tried to use alternate methods to loop through the cells, and am open to suggestions, but this is the way that I have found has mostly worked since I want to loop through just visible cells.</p>
  
  <pre><code>Dim Fchours As Range
  
  Set Fchours = ActiveSheet.Range(rng1.Address).SpecialCells _
          (xlCellTypeVisible)
  
  Do While i &lt; 328
  If ActiveSheet.FilterMode = True Then
      Fchours.Areas(i + 1).Select
      If ((Fchours.Areas(i + 1).Value) &lt;&gt; "") Then
          If (Fchours.Areas(i).Value) &lt; 5000 Then
              If ((Fchours.Areas(i + 1).Value) &lt; (Fchours.Areas(i).Value)) Then
              FCcount = FCcount + 1
              End If
          End If
      End If
  End If
  
  i = i + 1
  Loop
  </code></pre>
  
  <p>I expect it to select individual cells at a time, and most of the time it does, just every now and again it selects 2.</p>