# Excel Linking an IF statement with a Fill Color



## Officedude

HI, I am really trying to link an IF statetment if a cell is shadded. Once cell (E44) is shadded, i need Cell (T33) to be linked to cell (B3). If the cell has not been shaded then cell (T33) is to be left blank or with a - in it. I just need to know how to link a cell using a fill color (dont care if its all of them) if its even posable. I tryed using cell color but hasnt worked yet. 

Thanks in advance.

Officedude


----------



## Anne Troy

Formulas and colors don't mix. Instead, use a conditional format with a formula, like this:

http://www.officearticles.com/excel/conditional_formatting_with_formulas_in_microsoft_excel.htm


----------



## Officedude

I've tryed this, however, I can't figure out how to nest this conditional format within an IF Statement. What i need is if cell "A" is filled, then cell "B" will display the contents of cell "C" so to speak. Any sugestions?


----------



## Officedude

Officedude said:


> I've tryed this, however, I can't figure out how to nest this conditional format within an IF Statement. What i need is if cell "A" is filled, then cell "B" will display the contents of cell "C" so to speak. Any sugestions?


----------



## Anne Troy

Sorry. I've already said: Formulas and colors don't mix.

You could potentially use VBA, but you will not find a formula that will accomplish this task. They don't exist. The only other thing I can imagine is that cell B ALWAYS contains the contents of cell C, but is conditionally formatted as white font if cell A is empty.


----------



## Anne Troy

Looks like you could possibly use this UDF:
http://vbaexpress.com/kb/getarticle.php?kb_id=190

And then combine that formula with yours. Something like this in column b:
=if(ConditionalColor(A1,"interior")="color",C1,"")

(where color is the color to match)


----------

