Sub highlight_title()
Dim stopen As Boolean, notok As Boolean
Dim a As Variant, it As Variant
Dim dic As Object
Dim tit As String
Dim i As Long
Set dic = CreateObject("Scripting.Dictionary")
dic.comparemode = vbTextCompare
With Range("A1", Range("C" & Rows.Count).End(3))
a = .Value
.Interior.Color = xlNone
End With
For i = 2 To UBound(a, 1)
If a(i, 1) <> "" Then
tit = Split(a(i, 1), "-")(0)
If Not dic.exists(tit) Then
If LCase(a(i, 3)) = LCase("Open") Then stopen = True Else stopen = False
dic(tit) = i & "|" & i & "|" & stopen & "|" & True
Else
stopen = Split(dic(tit), "|")(2)
notok = Split(dic(tit), "|")(3)
If stopen Then
If LCase(a(i, 3)) = LCase("Completed") Then 'error
dic(tit) = Split(dic(tit), "|")(0) & "|" & i & "|" & True & "|" & False
Else
dic(tit) = Split(dic(tit), "|")(0) & "|" & i & "|" & True & "|" & notok
End If
Else
If LCase(a(i, 3)) = LCase("Open") Then stopen = True Else stopen = False
dic(tit) = Split(dic(tit), "|")(0) & "|" & i & "|" & stopen & "|" & notok
End If
End If
End If
Next
For Each it In dic.items
If Split(it, "|")(3) = False Then
Range("A" & Split(it, "|")(0) & ":A" & Split(it, "|")(1)).Interior.Color = vbYellow
End If
Next
End Sub