1. enter this tiny macro:
Sub Macro1()
MsgBox (Selection.Interior.ColorIndex)
End Sub
2. set the background color of any cell to any color and select that cell
3. run the macro to get the number
So if you set a cell t light orange, you would see 45
--
Gary''s Student
"tandavina" wrote:
How/Where do I get the color index?
I used the names of the colors:
Code:
--------------------
For i = 1 To grpnr
Select Case D1(i)
Case Cells.Interior("Light Orange")
grpsize(i) = 6
Case Cells.Interior("Aqua")
grpsize(i) = 4
Case Cells.Interior("Plum")
grpsize(i) = 3
Case Cells.Interior("Rose")
grpsize(i) = 2
Case Else
MsgBox "error in grouping color"
End Select
Next i
--------------------
only to return error.
--
tandavina
------------------------------------------------------------------------
tandavina's Profile: http://www.excelforum.com/member.php...o&userid=30334
View this thread: http://www.excelforum.com/showthread...hreadid=511457