Hello all,
I am looking to automate some conditional formatting based on a cell having a date value that includes 13:00. So 5/7/2024 13:00 or 5/9/2024 13:00 would highlight but 5/9/2024 17:00 would not. Below is the code I have. Kinda new to coding.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Range1 As Range
Set Range1 = Worksheets("Cover").Range("K11:K24")
For Each Cell In Range1
If Cell.Value Like "*13:00" Then
Cell.Interior.ColorIndex = 6
Else
Cell.Interior.Color = xlNone
End If
Next
End Sub
Bookmarks