How Can i use the cell colors as logical tests?

K

kashof

i applied conditional formating to one cell. it changes the color when the
condition is right. can i compare this color with another cell color and put
some formula that says "IF THE COLOR IN THE CELL S1 MATCHES THE COLOR OF CELL
T1,RETURN THE VALUE THAT IS IN CELL A1"???
I guess u guys understand what i need......do u?? u must have....u people
are better in excel. pl reply.thank u.
 
M

Mike H

Hi,

Excel doesn't provide any way to do that at worksheet level and in VBA the
colorindex property doesn't work with cells coloured using CF.

At worksheet level you can test the condition that caused the CF colour
change instead of the colour itself. For example lets say you have a CF that
turns A1 blue if it greater then 1. Testing if A1 is greater than 1 gets the
same results as testing the CF colour.

You can resort to VB code and here's how
http://www.cpearson.com/excel/CFColors.htm

Mike
 
G

Gord Dibben

CF colored cells are difficult to work with because Excel does not recognize the
colorindex of a CF colored cell.

You would be better off comparing the value(s) that the CF uses.

For more information on CF Colors and some code see Chip Pearson's site.

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


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top