Im trying to make this code that if it is before 11:00 AM the cell color is green if this is after 11:00 AM the cell color is yellow and after 2:00 PM it changes to red and also if its after 5 a message comes up but the cell is still red.. this is what I have so far but it dosnt work.. thank you


If Hour(Now) > 11 Then


     ThisWorkbook.Sheets("Measurements").Unprotect Password:="password"
        Range("H10").Interior.ColorIndex = 6
        ThisWorkbook.Sheets("Measurements").Protect Password:="password"
        If Hour(Now) > 14 Then

     ThisWorkbook.Sheets("Measurements").Unprotect Password:="password"
        Range("H10").Interior.ColorIndex = 3
        ThisWorkbook.Sheets("Measurements").Protect Password:="password"
      
        
        If Hour(Now) < 11 Then
   
        ThisWorkbook.Sheets("Measurements").Unprotect Password:="password"
        Range("H10").Interior.ColorIndex = 4
        ThisWorkbook.Sheets("Measurements").Protect Password:="password"
        
        
          If Hour(Now) > 17 Then
        If MsgBox("Must do now!