Find Colour of Cell...

A

Andri

Dear All,

I need to check certain cell, if the format colour is Red, i want to put
figure 1, Black = 2, Blue =3.

Please help by using formula?

Thank you for your kind attention.

Andri
 
M

Mike

You first need to return the colour and this requires a function such as:-

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

If you were then testing A1 you could call this function with this formula
in A1

=IF(CELLCOLORINDEX(A1,FALSE)=3,1,IF(CELLCOLORINDEX(A1,FALSE)=1,2,IF(CELLCOLORINDEX(A1,FALSE)=5,3,"")))

When changing the cell colour the function would need to be called again by
pressing F9. Also choose your font colour wisely because you are checking fro
black so a black font won't work.

Mike
 
A

Andri

Dear Mike,

Thank you..it works...

Brgds,andri

Mike said:
You first need to return the colour and this requires a function such as:-

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

If you were then testing A1 you could call this function with this formula
in A1

=IF(CELLCOLORINDEX(A1,FALSE)=3,1,IF(CELLCOLORINDEX(A1,FALSE)=1,2,IF(CELLCOLORINDEX(A1,FALSE)=5,3,"")))

When changing the cell colour the function would need to be called again by
pressing F9. Also choose your font colour wisely because you are checking fro
black so a black font won't work.

Mike
 
Top