Hi,

I have an IF then statement for my starting cell for a particular column. How do I extend the formula down to the end of the column of used rows? Nothing I have tried has worked so far. Basically I am comparing two dates and inserting the results into a third column. Here is the code below. I cannot figure out how to extend it. Thanks for your help!

Sub Testing()
Dim A5 As Date
Dim B5 As Date
Dim C5 As Date
If Range("A5") > Range("B5") Or Range("B5") Is Nothing Then
Range("C5") = "OnTime"
Else: Range("C5") = "Late"

End If
End Sub