Jay Merritt
New Member
- Joined
- Jan 15, 2019
- Messages
- 1
I have current code to change the background of the cell I updated "Today" to the color of the day. Today is the 15th of the month, so todays color is 15. What I am looking for is the "15" to change based on the day, so tomorrow the code would change to 16 without me going into the code daily and updating.
Private Sub WorkSheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 15
'use 1 - black with codes 2,4,6,8,15,19-20,24,27
Target.Font.ColorIndex = 1
'use 2 - white with codes 1,3,5,7,9-12,13-14,17-18,21,25-26,29-31
'Target.Font.ColorIndex = 2
End Sub
Private Sub WorkSheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 15
'use 1 - black with codes 2,4,6,8,15,19-20,24,27
Target.Font.ColorIndex = 1
'use 2 - white with codes 1,3,5,7,9-12,13-14,17-18,21,25-26,29-31
'Target.Font.ColorIndex = 2
End Sub