Search code examples
google-sheets

Google Sheet Conditional Formatting Custom Formula Wild Card


How do we use wildcard in custom formula in Google Sheet Conditional Formatting?

I tried =F1="ID-*" (Applied on G1) and this doesn't seem to work. It does nothing. Some of the values in column F starts with the text "ID-" and I want G to change color if that's the case. I searched Google for this for the past months and frustrated because of no working result.


Solution

  • You can use regular expressions:

    =REGEXMATCH(F1,"^ID-")
    

    enter image description here

    Or, simpler, since it's in the beginning you can just use LEFT:

    =LEFT(F1,3)="ID-"
    

    enter image description here