Excel Sorting / Filtering Colored Cells

  • Thread starter Thread starter Renegade
  • Start date Start date
R

Renegade

Does anyone know how to create a formula / function to obtain a count of
cells in each column that are colored? I need a formula / function that will
count both the text color and the cell fill color of various cells. If
anyone has a solution, I would greatly appreciate your help. Thank you.
 
You need to use a UDF. Try this one

Function colorcount(Target As Range)

colorcount = 0
For Each cell In Target
If cell.Interior.ColorIndex <> xlNone Or _
cell.Font.ColorIndex <> xlNone Then

colorcount = colorcount + 1
End If

Next cell

End Function
 
Back
Top