Excel Sorting / Filtering Colored Cells

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.
 
J

Joel

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
 

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

Top