Search code examples
arraysregexgoogle-sheetsconditional-statementsconditional-formatting

Google Sheets - Conditional formatting rules


I have a situation with this text:

"What do you want?
Foil.
What covarage do you want?
Fullbody."

More specifically, in the text above I want that the row to be automatic in a certain color if the text ends with: "What covarage do you want? Fullbody. "

I tried to add this condition, but without success:

The text ends with:
"What covarage do you want?
Fullbody. "

It didn't work, because the word Fullbody is on another line.

Any suggestions?


Solution

  • try:

    =REGEXMATCH(A1, "What covarage do you want\?\nFullbody$")
    

    enter image description here

    ? is escaped with \?
    new line is \n
    $ means "ends with"