Count text with different color in a range
Closed
craig davis
-
Feb 8, 2011 at 03:45 PM
RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 - Apr 11, 2011 at 03:24 AM
RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 - Apr 11, 2011 at 03:24 AM
Related:
- Count text with different color in a range
- Html text color - Guide
- Notepad++ background color - Guide
- Sound card color code - Guide
- Rg45 color coding - Guide
- Powertoys color picker download - Download - Other
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Feb 8, 2011 at 03:54 PM
Feb 8, 2011 at 03:54 PM
I think you have to create a custom function that would go thru each cell and then give you count based on font color
RWomanizer
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
120
Apr 11, 2011 at 03:24 AM
Apr 11, 2011 at 03:24 AM
Use this User defined Function:
here ColorCell is the cell with the required font color and CountRange is the range for which you want to count the mention font color cell.
here ColorCell is the cell with the required font color and CountRange is the range for which you want to count the mention font color cell.
Function ColorCount(colorCell As Range, countRange As Range) Dim rCell As Range Dim cellCol As Integer Dim ans As Long ans = 0 cellCol = colorCell.Interior.ColorIndex For Each rCell In countRange If rCell.Interior.ColorIndex = cellCol Then ans = ans + 1 End If Next rCell ColorCount = ans End Function