ndjustin20
Board Regular
- Joined
- May 25, 2011
- Messages
- 69
Hello,
I am trying to change the color of a cell, in a certain column, if the cells date is within 60 days of the date in the cell using VBA. I have figured out a way to do this using conditional formating though the problem I am running into is then filtering that specific color of cell as VBA doesn't recognize the conditional format. Here is what I have for a loop but it isn't working...
Any and all help is greatly appreciated
Justin
I am trying to change the color of a cell, in a certain column, if the cells date is within 60 days of the date in the cell using VBA. I have figured out a way to do this using conditional formating though the problem I am running into is then filtering that specific color of cell as VBA doesn't recognize the conditional format. Here is what I have for a loop but it isn't working...
Code:
Sub seeIfDateIsWithin60Days()
Dim dateColE As Range
For Each dateColE In Range("E7:E125")
If dateColE - Now() <= 60 Then
dateColE.Interior.ColorIndex = 3
End If
Next dateColE
End Sub
Any and all help is greatly appreciated
Justin