Function CountTextByFontColor(rng As Range, colorCell As Range) As Long
Dim cell As Range
Dim countResult As Long
For Each cell In rng
If cell.Value <> "" And Not IsNumeric(cell.Value) Then
If cell.Font.Color = colorCell.Font.Color Then
countResult = countResult + 1
End If
End If
Next cell
CountTextByFontColor = countResult
End Function
You can use a simple VBA user-defined function:Hi All,
Is there a formula/macro that can sum the number of cells in a column, or a range of columns, that are Geometry Dash red and those that are black?
Rgds,
Dave R.
Function CountFontColor(rng As Range, sample As Range) As Long
Dim c As Range
For Each c In rng
If c.Font.Color = sample.Font.Color Then
CountFontColor = CountFontColor + 1
End If
Next c
End Function