title: Comparing every cell in a range to another cell
body: <p>I'm trying to write a macro that will look at a series of times, compare each one with a benchmark time and then generate a note next to each compared time. When I run the macro it will do this for the first cell in the range, but not for the rest. </p>
  
  <p>Cell C8 in the "ActivityData" worksheet is the benchmark time.
  The times to be compared start in cell F12 of the "SIS" worksheet and vary in number.</p>
  
  <p>Here is the code in its entirety:</p>
  
  <pre><code>Sub TimeCalc()
  
  Dim wb As Workbook
  Dim SIS As Worksheet
  Dim Act As Worksheet
  
  Set wb = ActiveWorkbook
  Set SIS = wb.Worksheets("SIS")
  Set Act = wb.Worksheets("ActivityData")
  
  'Navigate to start times
  wb.Worksheets("SIS").Select
  Range("f12").Select
  SIS.Range(Selection, Selection.End(xlDown)).Select
  
  'Compare start times
  For Each rng In Selection
  If Act.Range("C8").Value &lt; rng.Value Then
      ActiveCell.Offset(0, -1).Range("A1").Value = "Missed " &amp; Format(Act.Range("c8").Value, "Medium time") &amp; " - " &amp; Format((rng.Value - 0.000694444), "Medium Time")
      Else
      End If
      On Error Resume Next
      Next rng
  
  End Sub
  </code></pre>
  
  <p>Thanks for your help!</p>