

Hope you have learned now how to use the LIKE String Operator in Google Sheets Query. It can return the names like Ann, Ash, etc. In this formula, I’ve used double underscore. =query(A2:A,"Select A where A like 'A_'") This would return the names like Ami, Amy, etc. Note: I am not following the above sample data here.įor example =query(A2:A,"Select A where A like 'Am_'") Use the underscore wildcard in Query to match any single character. The Use of _ (Underscore) Wildcard in Query (Alternative to Question Mark) Hope this answers how to use the % wildcard in the LIKE comparison operator in Query. See this example.įormula 3: =query(A2:A,"Select A where A like '%land'")įormula: =query(A2:A,"Select A where A like 'Sl%ia'")

What does it mean? It means, the percentage wildcard in LIKE returns all the strings starting with the letter “A”. It returns all the country names in column A as it’s.įormula 2: =query(A2:A,"Select A where A like 'A%'") It’s just like using the wildcard character *. You can use the percentage wildcard in the LIKE operator to match zero or more characters of any kind.įormula 1: =query(A2:A,"Select A where A like '%'") The Use of % (Percentage) Wildcard in Query (Alternative to Asterisk) You May Also Like: How to Use Wildcard Characters in Google Sheets Functions The supporting wildcards are % (percentage) and _ (underscore). The LIKE string operator brings the wildcard support to Query.But you can make that case-insensitive with a workaround that using the scalar functions Lower and Upper. The LIKE String Operator in Google Sheets Query is case sensitive.Examples to the Use of LIKE String Operator in Google Sheets Query The LIKE comparison operator in Query is similar to the SQL LIKE Operator. Let me explain how to use the LIKE string comparison operator in Google Sheets Query. If you want to learn about the other complex comparison operators in Query, please check the section “Additional Resources” at the end of this post. In this tutorial, you can learn the use of this operator. Like is a complex string comparison operator. Related : Simple Comparison Operators in Sheets Query. There are simple as well as complex comparison operators. That conditions you can control with different comparison operators. The Where clause in Query is very useful in filtering rows based on given conditions. I’ll come to that after the next few paragraphs. But in Query, you can’t use the same symbols in LIKE. The said two wildcards are similar to the asterisk and question mark which are common in use in other Spreadsheet functions. It enables the use of two wildcards in Google Sheets Query. You can use the Like comparison operator in the Query Where Clause. The LIKE string operator in Google Sheets Query is useful for complex string comparisons.
