Try this...
Sub GetMax()
Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
Dim rMyRng As Range, r As Range, x As Byte, sCol As String
lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
Set rMyRng = Range("E1:K" & lEndRw)
For x = 1 To 2
sCol = "A": iColor = -4105 'For Black
If x = 2 Then sCol = "B": iColor = 3 'For Black
For i = 2 To lEndRw
For Each r In rMyRng.Rows(i).Cells
If r.Value <> "" Then
If r.Font.ColorIndex = iColor Then
lTemp = lTemp + 1
Else
If lTemp > lMax Then lMax = lTemp
lTemp = 0
End If
End If
Next r
Cells(i, sCol).Value = lMax
lTemp = 0
lMax = 0
Next i
Next x
End Sub
Bookmarks