View Single Post
  #2 (permalink)  
Old December 19th, 2005, 11:26 AM
shattered shattered is offline
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shattered Send a message via Yahoo to shattered
Default

depends on how the data is stored - if its in date format then its a simple case of comparing one date to the other

With Sheets("Sheet1")
    If .Cells(2, 2).Value < .Cells(2, 3).Value Then
        .Cells(2, 4).Value = "Before"
    Else
        .Cells(2, 4).Value = "After"
    End If
End With

if its stored purely as text then its a case of parsing the text and then passing it as a date before doing the comparison