I am trying to write a macro, which, when a date value is entered into one cell, 10 days after that date it will change the color of the cell to the right of it a shade of red.
This is what I have so far, but it's not working. Can anyone point out what I am doing wrong? Thank you!!!
This is what I have so far, but it's not working. Can anyone point out what I am doing wrong? Thank you!!!
Code:
Sub Colouring()
Dim TodayDate As Date
Dim cell As Range
TodayDate = Day(Now)
For Each cell In Range("D8:D67, G8:G67, J8:J67, M8:M67, P8:P67, S8:S67, V8:V67, Y8:Y67, AB8:AB67, AE8:AE67, AH8:AH67, AK8:AK67, AM8:AM67, AP8:AP67, AS8:AS67, AV8:AV67, AY8:AY67, BA8:BA67, BD8:BD67, BG8:BG67")
If TodayDate = cell.Value + 10 Then
With rCell.Offset(1, 0)
cell.Interior.ColorIndex = RGB(255, 199, 206)
cell.Font.ColorIndex = RGB(156, 0, 6)
End If
Next cell
End Sub