In a Google Spreadsheet, I want to use a formula that will output a certain text or number if a certain cell contains certain letters.
For example, if I put =IF(A1="Black";"YES";"NO")
and A1 is equal to "Black" - it outputs "YES" correctly. However when I put =IF(A1="Bla";"YES";"NO")
it outputs "NO". Is there any formula that I can use that I can say something like =IF(A1 CONTAINS "Bla";"YES";"NO")
so it outputs "YES".
You can use RegExMatch
:
=IF(RegExMatch(A1;"Bla");"YES";"NO")