This macro might help. It seems to be easier to start at the bottom and work upwards.
Sub Test()
For N = Cells(65536, 1).End(xlUp).Row To 3 Step -1
For M = 2 To 5
If Cells(N, M) = "YES" Then
YesCount = 1
Counter = 1
Do While (Cells(N - Counter, M) = "YES" Or (Cells(N - Counter, M) = "NO" And Application.CountIf(Range(Cells(N - Counter, 1), Cells(N - Counter, 4)), "YES") = 0))
Counter = Counter + 1
If Cells(N - Counter, M) = "YES" Then YesCount = YesCount + 1
If N - Counter = 1 Then Exit Do
Loop
If YesCount >= 3 Then
Cells(65536, 7).End(xlUp).Offset(1, 0) = Cells(N, 1)
Cells(65536, 7).End(xlUp).Offset(0, 1) = YesCount & Chr$(M + 64)
End If
End If
Next M
N = N - Counter
Next N
End Sub
You can then sort your data by date.
Bookmarks