rollover, put is function in a module,
Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
'
' This function returns the ColorIndex value of a the Interior
' (background) of a cell, or, if OfText is true, of the Font in the cell.
'
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange(1,1).Font.ColorIndex
Else
CellColorIndex = InRange(1,1).Interior.ColorIndex
End If
End Function
To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is at the top-left of the spreadsheet this will
open the VBA editor, in Project Explorer click on your workbook name, if you
don't see it press CTRL + r to open the Project Explorer, then go to insert,
module, and paste the code in the window that opens on the right hand side,
press Alt and Q to close this window and go back to your workbook and press
alt and F8, this will bring up a box to pick the Macro from, click on the
Macro name to run it. If you are using excel 2000 or newer you may have to
change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it to
medium
Then in cell O1 put =CellColorIndex(A1) and copy down as far as needed for
the other rows
Will that do what you want?
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
"rollover99 via OfficeKB.com" <u14080@uwe wrote in message
news:69f8ddf2ac9f5@uwe...
This is not of help to me as it does not specify what I need to enter for
a
column nor returning the cell color value to a specific cell. I did look
at
the following code but where would it specify a range of the column to
look
at and where to return the value to a specific column. Like lokk in cell
A1,
what is the color, return the colors value to cell O1, next row, cell A2
and
so on???
Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
'
' This function returns the ColorIndex value of a the Interior
' (background) of a cell, or, if OfText is true, of the Font in the cell.
'
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange(1,1).Font.ColorIndex
Else
CellColorIndex = InRange(1,1).Interior.ColorIndex
End If
End Function
Paul B wrote:
rollover, not sure what you want to do, but maybe this will help.
http://www.cpearson.com/excel/colors.htm
--
Message posted via http://www.officekb.com