Formatting based on a condition

  • Thread starter Thread starter haas786
  • Start date Start date
H

haas786

Hey all,

Quick question: I have a list of names in column A. Some of these
names have an "X" next to them in column B. Is there a way to apply
condition formatting in the way of saying if there is an X in column
B, fill in a red color in the corresponding name in column A. For
example, A5 has Bill Davis in it, B5 has an X in it, therefore cell A5
would be color filled Red. I've tried conditional formatting but it
works only for the cell i want something done to and doesn't take into
consideration conditions for other cells.

Please help...thanks!
 
I don't see an easy way to do that (other than a circular conditional
format, which would be gross).

It is super simple with VBA. Is that allowed?

Chris
 
Select the entire Column A, go to the Conditional Formatting dialog and
select "Formula Is" from the first drop down and use this formula in the
second field...

=B1="x"

click the Format button and choose your red format and then OK your way back
to the sheet. Put an X in a cell in Column B and the corresponding cell in
Column A will be filled in with the color you selected.

Rick
 
Select the Cell A1 and bring up the conditional formatting dialog. Switch
from Cell Value is to Formula is. Add this formula
=TRIM(UPPER(B1))="X"
and create your red format

This formula will work for both upper and lower case X and it will work even
if the X is padded with blank spaces.
 
And that's why MVPs rule the world :)

Select the entire Column A, go to the Conditional Formatting dialog and
select "Formula Is" from the first drop down and use this formula in the
second field...

=B1="x"

click the Format button and choose your red format and then OK your way back
to the sheet. Put an X in a cell in Column B and the corresponding cell in
Column A will be filled in with the color you selected.

Rick








- Show quoted text -
 
Back
Top