View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LinLin LinLin is offline
external usenet poster
 
Posts: 46
Default IF Statement - compare to coloured cell

Thanks Otto

That's what I suspected because I had a look at a lot of posts and nothing
had any info like this.

This is my problem:

I have a cell (A1) in which you can enter a number, and for arguments sake,
if the number is 10, the cell will turn red.
I already have that set up using conditional formatting.
I would also like a statement to appear in the cell (B1) below which says
"value not valid"
So, normally, I would say If A1=RED, then "Value not valid" etc.

Conditional formatting is for formatting only.
I can't see any other way to add a Text Warning if required?

Thanks again!

"Otto Moehrbach" wrote:

LinLin
You cannot write an IF statement formula that looks at the color of the
cell. VBA can do that, but not a formula. Perhaps you can work with the
condition that makes that cell colored? Come back if you want to try a VBA
solution. Provide more detail about what you have and what you want to do.
HTH Otto
"LinLin" wrote in message
...
Hi Everyone

I'm not sure how to write an IF statement.

If Cell A1 is shaded RED, I want cell B1 to to say OK
If A1 is not red, then no message.

The IF statement is obviously in cell B1.

As far as I can see, conditional formatting will not work, because I want
a
message in B1, not a format.

Any ideas?

many thanks