S
Steve
Hi Claus I have tried the module approach as this would be ideal but
when I use it I get
#NAME#
Do you know how I can rectify this. The font color is definitely red
and not conditionally formatted.
Thanks
Steve
Hello Steve,
Am Thu, 07 Jun 2012 15:08:41 +0100 schrieb Steve:
You can filter for font color and then use SUBTOTAL
Your values in A1:A20
Filter for red color and then use
=SUBTOTAL(3,A1:A20)
Or use VBA to count your cells with red font color
Copy following code in a standard module
In the sheet use e.g. =ColorCount(A1:A20)
Function ColorCount(MyRange As Range) As Long
Dim rngC As Range
For Each rngC In MyRange
If rngC.Font.ColorIndex = 3 Then
ColorCount = ColorCount + 1
End If
Next
End Function
Please start a new thread for new questions.
Regards
Claus Busch
when I use it I get
#NAME#
Do you know how I can rectify this. The font color is definitely red
and not conditionally formatted.
Thanks
Steve
Hello Steve,
Am Thu, 07 Jun 2012 15:08:41 +0100 schrieb Steve:
I have text ithin cells which have been formatted with font colour red
and I would like to count the number of cells with this format. It is
not conditionally formatted but done manually.
Is it possible to count the number of cells with this font formatting?
You can filter for font color and then use SUBTOTAL
Your values in A1:A20
Filter for red color and then use
=SUBTOTAL(3,A1:A20)
Or use VBA to count your cells with red font color
Copy following code in a standard module
In the sheet use e.g. =ColorCount(A1:A20)
Function ColorCount(MyRange As Range) As Long
Dim rngC As Range
For Each rngC In MyRange
If rngC.Font.ColorIndex = 3 Then
ColorCount = ColorCount + 1
End If
Next
End Function
Please start a new thread for new questions.
Regards
Claus Busch