Hi Guys,
I'm pretty new to VBA and am trying to make something work...
My code is below; it does not work.
This is probably because the syntax is wrong, but hopefully you can see what I'm trying to do...
I want the cell in column F to read "Cold" if the cell to the left of it (column E) has a date in it which is over 90 days old.
If its under 90 days, then i want it to do nothing as there is a data validation drop down box.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Sheets("Sheet1")
Dim lvalue As Date
lvalue = Now
If .Cells("E1").Value > lvalue - 90 Then
Else
If .Cells("E1").Value < lvalue - 90 Then .Cells("F1") = "COLD"
End If
End With
End Sub
Bookmarks