User Defined Function - Title

  • Thread starter Thread starter filky
  • Start date Start date
F

filky

I did consider this but I e-mail the spreadsheet around to differen
people and wanted the module in the workbook I issue.

I have managed to shorten it somewhat now to;

=CountByColor.CountByColor(B$17:B$31,CellColorIndex.CellColorIndex($A3))

But I still can't find a way of referring to the function by a simpl
name. I tried the Macro-Options-Description facility but I still ge
the original full path description in the UDF menu which truncates th
end so they all look the same.

Any other thoughts? Thanks for looking by the way
 
How about this:

Function ColorCount(MyRange As Range, MyColorIndex As
Integer) As Double
Dim c As Range
On Error Resume Next
For Each c In MyRange.Cells
If c.Interior.ColorIndex = MyColorIndex Then _
ColorCount = ColorCount + 1
Next
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

Back
Top