Hoping someone can help me here, as this is uncharted territory for me.
I am hoping to write a Macro that checks If the date in any cell in column U is 6 months greater than the system date, it will color the entire row's text red.
I found this tidbit out there, and was hoping someone can skillfully re-purpose it to do what I described above. From what I saw this may be the answer to what I was looking for but I am not yet skillful enough to do this myself.
The Assumptions for this sample was:
If the date in column H matches the system date, then those rows will become green.
If the date in column H is the next date (tomorrow), those rows will become yellow.
If the date in column H is 2 to 6 days out, those rows will become blue.
If the date in column H is 7 to 13 days out, those rows will become orange.
If the date in column H is 14 to 20 days out, those rows will become red.
If the date in column H is 21 to 27 days out, those rows will become tan.
If the date in column H is equal to or greater than 28 days out, those rows will remain white.
Sub test2()
Dim LR As Long, i As Long
LR = Range("U" & Rows.Count).End(xlUp).Row
For i = 2 To LR
With Range("U" & i)
Select Case .Value - Date
Case 0: .EntireRow.Interior.ColorIndex = 4
Case 1: .EntireRow.Interior.ColorIndex = 6
Case 2 To 6: .EntireRow.Interior.ColorIndex = 5
Case 7 To 13: .EntireRow.Interior.ColorIndex = 45
Case 14 To 20: .EntireRow.Interior.ColorIndex = 3
Case 21 To 27: .EntireRow.Interior.ColorIndex = 53
End Select
End With
Next i
End Sub
I hope what I'm looking for is somewhere in there, but if not I am open to suggestions on other methods to research.
Thanks!
Bookmarks