View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Is there a fuction that counts number of highlighted cells Excell

Call with below call. Note: The code below will not automatically update
when color get changed. Color changes do not cause a recalculation of the
spreadsheet.


=FilledCells(B7:D10)


Function FilledCells(Target As Range)
Count = 0
For Each Cell In Target
If Cell.Interior.ColorIndex < xlNone Then
Count = Count + 1
End If
Next Cell
FilledCells = Count
End Function"bstrack" wrote:

I want to total the number of highlighted or specific fill color cells in a
range. The data in the cell in not my concer just the highlight or fill.