19

I'm trying to conditionally format a bunch of cells containing strings. If the string contains either a - or a +, the cell should be highlighted in red or green, respectively. However, when just putting a + o - in the conditional formatting rule it says that the formula is invalid.

If I enclose the + or - with double or single quotes it does not work unless the cell literally contains "+" instead of +.

enter image description here

1 Answer 1

36

Use ~ (tilde) to escape + (plus sign), = (equal sign) and also other special characters like * (asterisk) and ? (question mark) that are used as wildcards.

Conditional Formatting

References
Apply conditional formatting rules - Docs editors Help

1
  • This solution still works in 2023, thanks :)
    – DannyL
    Jun 11 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.