Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. For yrNum = 1 To 100
  2. If DateValue(Format(base.Range("Q" & j).Value, "mm/dd/yyyy")) >= DateValue(dDate) And _
  3. DateValue(Format(base.Range("R" & j).Value, "mm/dd/yyyy")) <= DateValue(dDate) Then
  4. wb2.ActiveSheet.Range("D" & lrow3 + 1).Value = base.Range("T" & j).Value
  5. wb2.ActiveSheet.Range("E" & lrow3 + 1).Value = base.Range("U" & j).Value
  6. Exit For
  7. Else
  8. base.Range("Q" & j) = ActiveCell
  9. base.Range("Q" & j) = ActiveCell.Offset(0, 9)
  10. 'after executing this is I have to set this offsetted cell to be the active one
  11. 'on which i will be referring in the next loop
  12. End If
  13.  
  14. Next yrNum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement