Count yellow-highlited rows

×

מיכ×ל (מיקי) ×בידן

As Luke said - there are several ways.
1) UDF:
Function CountIntColor(MyColor As Range, MySumRange As Range)
Application.Volatile
IntCol = MyColor.Interior.ColorIndex
For Each CL In MySumRange
If CL.Interior.ColorIndex = IntCol Then
Counter = Counter + 1
End If
Next
CountIntColor = Counter
End Function
===========
The first argument is the range of colored cells to be counted.
The second argument will refere to a single cell colored with YELLOW.
***************************************
2) Using the CELL function. Look it up in Excels Help
3) In Excel "2007"/"2010" - you can filter by Cell Interior color and count
the visible cells with SUBTOTAL function.
Micky
 

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