Link to home
Start Free TrialLog in
Avatar of SOUTHAMERICA70
SOUTHAMERICA70

asked on

Displaying the color index of a cell

Want i'm trying to accomplish is:
In column A I have multiple cells with different colors in them in column B I wanted the color index of each colored cell, for example.
If column A cell A1 is red I wanted in column B, B1 to display 3 and so on.
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Hello SOUTHAMERICA70,

Chip Pearson has numerous code examples showing
how to evaluate cell colors.

If the coloring is due to "normal" formatting:

http://www.cpearson.com/excel/colors.htm

If the coloring is from Conditional Formatting:

http://www.cpearson.com/excel/CFColors.htm


Regards,

Patrick
ASKER CERTIFIED SOLUTION
Avatar of Dave
Dave
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dave,

Brilliant!

Patrick
thx Patrick, I had missed your earlier post

although new Excel security updates now flag XLM use, so the invisible macro is getting hard to use :)

Dave
Avatar of SOUTHAMERICA70
SOUTHAMERICA70

ASKER

Quick question...how do I use XLM?
It is used automatically by the range name, ie the
=GET.CELL(63,A1
portion is using a XLM formula to retrieve the cell backgrund colour (63 is the colour code)

Cheers
Dave
Got it.  Thanks.  Also I created a new excel sheet but when I place the  =CellColour+RAND()*0 in the cell I get a #NAME? error.