How to create a custom conditional formatting rule in Google Sheets based on specific text?

Hey everyone,

I’m stuck on setting up a conditional formatting rule in my Google Sheets. What I want to do is pretty simple, but I can’t figure out the right formula.

Here’s what I’m trying to do:

  • If cell C58 has the exact phrase ‘long cont’ in it
  • Then I want cell D58 to turn green

I’ve tried a few things, but nothing seems to work. Can anyone help me out with the correct syntax for this?

Really appreciate any help you can give. Thanks in advance!


PS: If you know any other cool conditional formatting tricks, I’d love to hear them too!

hey dancingfox, try this formula in conditional formatting: =EXACT(C58,“long cont”). select D58, go to Format > Conditional formatting, choose “Custom formula is” and paste that in. should turn D58 green when C58 matches exactly. hope this helps! lemme know if u need anything else

For your specific need, you can use this formula in conditional formatting:

=SEARCH(“long cont”, C58) > 0

This will turn D58 green when C58 contains ‘long cont’, regardless of case or surrounding text.

To set it up:

  1. Select D58
  2. Go to Format > Conditional formatting
  3. Choose ‘Custom formula is’
  4. Enter the formula above

A useful trick: You can apply this to multiple cells by selecting a range (like D58:D100) instead of just D58. This way, each cell in column D will turn green if its corresponding cell in column C contains ‘long cont’.

Remember, Google Sheets’ conditional formatting is quite powerful. You can combine multiple conditions using AND() or OR() functions for more complex rules.

I’ve encountered similar issues before, and here’s what worked for me:

Go to Format > Conditional formatting. Choose ‘Custom formula is’ and use this formula:

=REGEXMATCH(C58, “long cont”)

This will turn D58 green when C58 contains ‘long cont’, even if there’s other text in the cell.

A bonus tip: You can use REGEXMATCH for partial matches too. For instance, =REGEXMATCH(C58, “cont”) would highlight if ‘cont’ appears anywhere in C58.

Hope this helps! Let us know if you need any clarification.