If Then Statement Clarification
Try this code
Sub Dates()
firstdates = Range("a2") - Range("a1")
seconddates = Range("a3") - Range("a2")
If seconddates firstdates Then
MsgBox Range("a3")
Else
MsgBox Range("a1") + firstdates - seconddates
End If
End Sub
Ian G
|