Hello, I am working with this section of a macro and it keeps giving me the error "Type Mismatch".
I am trying to see if the value in each of the cells in H7:H40 is less than 5 minutes. Anyone know what I'm doing wrong?Dim time As Range Dim cell As Range Dim ws As Worksheet Set ws = Application.ActiveSheet Set time = ws.Range("h7:h40") For Each cell In time.Cells If cell.Value <= "00:05:00" Then 'This is the line that says there is a mismatch. Rows(ActiveCell.Row).Select Selection.Interior.ColorIndex = 1 End If Next
Bookmarks