title: Check if row is within a certain Time Limit
body: <p>This is a Macro that checks if rows are older than 30 mins of NOW and clears them if they are not.
  I am trying to change:</p>
  
  <pre><code>Loop Until &gt; Lastrow 
  </code></pre>
  
  <p>to instead loop only until it reaches the first row within 30 mins of Now (to reduce the amount of computation as the machine is struggling). I've tried variations on:</p>
  
  <pre><code>Loop Until .Cells(i, "A") &gt; TimeLimit
  </code></pre>
  
  <p>But without luck. Any help much appreciated!
  Context:</p>
  
  <pre><code>Lastrow = Range("A1").SpecialCells(xlCellTypeLastCell).row
  
  With ws1
  i = 1
      TimeLimit = Time - TimeSerial(0, 30, 0)
          Do
  
                  If .Cells(i, "A") &lt; TimeLimit Then
                     .Cells(i, "A").EntireRow.ClearContents
                  End If
  
              i = i + 1
          Loop Until i &gt; Lastrow
      End With
  
      End Sub
  </code></pre>
  
  <p>Here's the timer code it needs to go into:</p>
  
  <pre><code>Sub Update()
  
      With Sheets("DATA")
  
          rw = .Cells(.rows.Count, 1).End(xlUp).row + 1
          .Range(.Cells(rw, 1), .Cells(rw, 6342)).value = Sheets("DATA").Range("A7:IJZ7").value
  
      End With
      Application.OnTime Now + TimeSerial(0, 0, 1), "update"
  
  End Sub
  </code></pre>