PDA

View Full Version : Counting the filled cells



hitech
09-02-2010, 02:45 AM
Is there any way to count filled cells in a range? Any good article?

p45cal
09-02-2010, 06:39 AM
you could write your own udf, used thus on a worksheet:
=fillcount(D10:F16)
Function FillCount(xx As Range)
FillCount = 0
For Each cll In xx.Cells
If cll.Interior.ColorIndex <> xlNone Then FillCount = FillCount + 1
Next cll
End Function

aysam
09-02-2010, 07:34 AM
Peace to you all
I need it to change count as soon as I fill a cell with a colour.
I know it 's possible ! But How??
= = = = = = = = = = = = = = =
Hi All I got it
I Should add this line to the code

Application.Volatile True
Is it correct ??????