ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How Can i use the cell colors as logical tests? (https://www.excelbanter.com/excel-worksheet-functions/173104-how-can-i-use-cell-colors-logical-tests.html)

kashof

How Can i use the cell colors as logical tests?
 
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.

Mike H

How Can i use the cell colors as logical tests?
 
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



"kashof" wrote:

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.


Gord Dibben

How Can i use the cell colors as logical tests?
 
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


On Tue, 15 Jan 2008 05:09:00 -0800, kashof
wrote:

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.




All times are GMT +1. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com