By: Lutfor Rahman Shimanto

In reply to Iona.

Dear Iona

Thanks for visiting our blog and sharing your requirements! I have reviewed your goal and created an Excel VBA Event procedure (assuming your dates are in column A).

Excel VBA Event Procedure:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim cell As Range

If Not Intersect(Target, Range("A:A")) Is Nothing Then
For Each cell In Target
If cell.Value < (Date - 7) And cell.Interior.Color <> RGB(0, 255, 0) Then
cell.Font.Color = RGB(255, 0, 0)
ElseIf cell.Interior.Color = RGB(0, 255, 0) Then
cell.Font.Color = RGB(0, 0, 0)
End If
Next cell
End If

End Sub

Right-click on the sheet name tab, paste the given code into the sheet module and save it. Hopefully, the idea will fulfil your goal; good luck.

Regards
Lutfor Rahman Shimanto
Excel & VBA Developer
ExcelDemy