title: Moving to the next column
body: <p>Can anybody please help me figure out my problem?
  I have this code that I would like to move to the next column if the condition is not met.I'm stuck and don't know where to proceed.</p>
  
  <pre><code>Dim lrow3, lrow1 as long
  dim dDate as Date
  dim yrNum, j as Integer
  
  dDate = Format(Now(),"mm/dd/yyyy")
  
  lrow3 = ActiveSheet.Cells(Rows.count, 2).End(xlUp).Row
  lrow1 = Sheets("Sample").Cells(Rows.count, 2).End(xlUp).Row
  for j = 2 to lrow1
  For yrNum = 1 To 100
      If DateValue(Format(Range("Q" &amp; j).Value, "mm/dd/yyyy")) &gt;= DateValue(dDate) And _
      DateValue(Format(Range("R" &amp; j).Value, "mm/dd/yyyy")) &lt;= DateValue(dDate) Then
      ActiveSheet.Range("D" &amp; lrow3 + 1).Value = Range("T" &amp; j).Value
      ActiveSheet.Range("E" &amp; lrow3 + 1).Value = Range("U" &amp; j).Value
      Exit For
      Else
           Range("Q" &amp; j) = ActiveCell
           Range("Q" &amp; j) = ActiveCell.Offset(0, 9)
      'after executing this is I have to set this offsetted cell to be the active one 
       'on which i will be referring in the next loop
      End If
  
  Next yrNum
  next j
  </code></pre>
  
  <p>In the snippet, if the value in <code>Q &amp; j</code> does not met the requirements, then i have to check the 9th letter after Q which is Z and so on.
  By the way what I'm comparing on this are date values in the cell.</p>