Forum Discussion
SheIsASheila
Jun 01, 2023Copper Contributor
How do I create a formula that will change the text color if 2 words exist in two different cells?
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 i...
- Jun 01, 2023You 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
Jun 01, 2023Silver Contributor
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
=($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
- SheIsASheilaJun 01, 2023Copper Contributor
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")?
- mtarlerJun 01, 2023Silver Contributorno. 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)
- SheIsASheilaJun 01, 2023Copper Contributor
mtarler Awesome! Thanks very much for your knowledge & your time!! It's very much appreciated. 🙂