Countif color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is there a way to get countif to count based on the color of text? how about
if text is bold?

thanks
 
To count cells with bold text use this UDF

Function CountBold(rg As Range) As Long
''originally posted by Ron Rosenfeld
Dim C As Range
For Each C In rg
CountBold = CountBold - C.Font.Bold
Next C
End Function

Usage is: =CountBold(A1:F23) or whatever range you choose.

Little more complex for colors.

See Chip Pearson's site for info and code.

http://www.cpearson.com/excel/colors.htm

One more method you may want to explore.

Select a range of cells and Edit>Find>Options>Format>Format>Pattern. Select a
color and "Find All"

In the list box select top cell found then hold SHIFT key and select last cell
found.

You will get a count = xx on the Status bar if that option is set to "count"


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top