The IF CONTAINS function in Google Sheets can be used to look for cells that contain a certain string as its value or as a portion of its value. It works as follows:
If range contains string, then value if true; else, value if false
While there is no explicit CONTAINS function in Google Sheets, it does not mean that you cannot pull this off! You can combine the IF function with the SEARCH and REGEXMATCH functions to get the same result. Learn how to do it by following this tutorial.
IF CONTAINS Google Sheets Syntax
We will have two syntax forms of IF CONTAINS formula.
We shorten “Matric” to “Matr” to show that our function works to detect whether the range contains the given text or string.
Step 3: Check output
If contains google sheets using if plus search
The difference this time is that SEARCH is a case-insensitive function; so it detects “matric” as the same as “Matric”, marking it as well.
Even though there is no explicit IF CONTAINS function in Google Sheets, we can combine IF with the REGEXMATCH and SEARCH functions to get the same results. The IF+REGEXMATCH solution is best for case-sensitive searches while the IF+SEARCH solution is best for case-insensitive searches.
Supercharge Your Spreadsheets with Lido
🚀 Import data from anywhere and build custom tools and powerful dashboards straight from your spreadsheet. Discover what's possible in our Build Gallery.
Related IF Functions
IF: Allows you to check for specific conditions across a dataset
SUMIF: Use to sum numbers if they meet a certain condition..
SUMIFS: Sums data from cells that meet multiple criteria
COUNTIF: count data if it fulfils certain criteria
COUNTIFS: Count data that fulfils two or more criteria.