I am trying to have the code take a range of cells and compare each row (each row contains a date) within that range to a cell and if the date contained in the row is before the current date to fill that row with an interior color. I am still rather new to VBA so likely I am just making some silly assumtions about how to word the coding. Thanks tons in advance for any help.
Private Sub Highlight_Click()
Dim Current_Date As Date
Current_Date = Worksheets("Name").Range("H1").Value
LastRow = [A5].End(xlDown).Row
ActiveSheet.Range("A5:H" & LastRow).Select
If Range("E5").Value <= Current_Date Then Row.Select
With ActiveRow.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Do Until Cell.Value Is Empty
Loop
End Sub
Bookmarks