Thread: Colour index
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers Mike Rogers is offline
external usenet poster
 
Posts: 194
Default Colour index

Arran

You asked for the index numbers for the colors and Jim gave them to you.
Place the code he provided in a module in VBA and goto macro toolsmacro and
run the code and you will have (again) all the index numbers. Yes you should
have explained more in your first post as to what you needed, Jim would have
been able to help you, I am sorry to say that I can not help.

Mike Rogers

"Arran" wrote:

Hi Jim
Afraid to say Im not sure what it is you have given me!!
Dont think my post explained my problem very well.
I have a UDF that Sums the contents of Comments in cells that have a certain
fill colour. I want to use the colour index number of a colour in the
function arguments eg Pale Orange=45.
Since posting I have found the colour index numbers for the 56 colours. So
far I have only got it running by ref an other cell that has the matching
fill colour in it.
My thinking is that I must be able to use, Pale Orange, colourindex45 or
something like that in the function argument. Any suggestions.

Arran

"Jim Cone" wrote:

Sub extra()
Dim N As Long
For N = 1 To 56
Cells(N , 2).Interior.ColorIndex = N
Cells(N , 2).Value = N
Next
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Arran"
wrote in message
Where can I find the Index numbers for the colours?