Hi
Use an UDF. Like this one
Public Function GetColor(MyCell As Range) As Variant
GetColor = MyCell.Interior.ColorIndex
End Function
Now, the formula
=GetColor(A1)
returns the color code for cell A1. But be aware that changing cell color
doesn't trigger recalculating (and making the function volatile doesn't help
here) - you have to do it manually (pressing F9) or to wait until
recalculation is triggered by some change in cell values.
--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets
"Bart Schouw" <Bart
wrote in message
...
It would be great if you could get returned the colorcode of certain cell,
based on this new calculcations are possible. For example some of my
turnover
is based on pre-sales, these cells have have a certain color. It would be
great if i could count the number of cells with this color.