SOLVED

How do I create a formula that will change the text color if 2 words exist in two different cells?

Copper Contributor

Hi,

 

I want to create a spreadsheet that will change the font color when a combination of words (in 2 different cells) exists. How would I do that? As an example, it would be on the same row but in different columns, I would want the font to turn red when say Blue (in A1) is entered and Rabbit (is entered in H1). 

Is there a way to do this?

 

Thank you,

4 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution
You can use conditional formatting. Select custom formula and then the formula would be like:
=($A1="Blue")*($H1="Rabbit")
notice the $ in front of the A and H "locking" those columns so you can apply it to many cells on the row and they will all reference those columns and multiple rows will all look at their row (i.e. no $ before the row number)
and under format just go to font tab and change how you want it to look

@mtarler 

Thank you very much. I will give this a try. If I want it to apply to the whole spreadsheet for columns A & H, would I just leave off the cell # =($A="Blue")*($H="Rabbit")?

no. it is already formatted correctly for the whole sheet. Think this way, the formula must work for the top left cell of the 'Applied to Range' and then if you copy that formula down/right it should work for each corresponding cell (i.e. the reason I 'locked' the columns but not the rows)

@mtarler Awesome! Thanks very much for your knowledge & your time!! It's very much appreciated. :)

1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution
You can use conditional formatting. Select custom formula and then the formula would be like:
=($A1="Blue")*($H1="Rabbit")
notice the $ in front of the A and H "locking" those columns so you can apply it to many cells on the row and they will all reference those columns and multiple rows will all look at their row (i.e. no $ before the row number)
and under format just go to font tab and change how you want it to look

View solution in original post