Google Sheets | QUERY | Function | WHERE | LIKE | Wildcard | Match | Example | Spreadsheet Tutorial

Поделиться
HTML-код
  • Опубликовано: 3 апр 2024
  • With the Google Sheets QUERY function's WHERE clause and LIKE operator you can conduct exact matches for a specified string or do a wildcard search. The wildcard characters you can use with LIKE are % and _(underscore).
    For an intro to QUERY function, please refer to the tutorial How to Use Query in Google Sheets whose link is given below.
    -------------------------------------
    How to Use QUERY in Google Sheets?
    QUERY helps, among others, to extract specific or all data from a range:
    • Google Sheets | QUERY ...
    -------------------------------------
    How to Use QUERY with WHERE clause and MATCHES operator in Google Sheets?
    MATCHES operator assists to conduct an exact or a wildcard search:
    • Google Sheets | QUERY ...
    -------------------------------------
    How to Use QUERY with WHERE clause and starts with or ends with operators in Google Sheets?
    Use where clause and starts with, ends with or both the operators to get data based on one or more conditions:
    • Google Sheets | QUERY ...
    -------------------------------------
    How to Use QUERY with WHERE clause in Google Sheets?
    To conditionally extract data, use the QUERY function with its WHERE CLAUSE:
    • Google Sheets | QUERY ...
    -------------------------------------
    How to Use XLOOKUP to Extract Multiple Values in Google Sheets?
    XLOOKUP can return a single row or column with the search key:
    • Google Sheets | XLOOKU...
    -------------------------------------
    How to Use VLOOKUP in Google Sheets?
    Use VLOOKUP to get a single value:
    • VLOOKUP Google Sheets ...
    -------------------------------------
    How to Use IFS in Google Sheets?
    IFS allow multiple logical expressions:
    • Google Sheets IFS | Te...
    -------------------------------------
    How to Use IF in Google Sheets?
    Use IF to compare one value with another:
    • Google Sheets IF | Tut...
    -------------------------------------
    How to Use IF with AND in Google Sheets?
    Use IF with AND to Use Multiple Logical Expressions in IF:
    • Google Sheets | IF | A...
    -------------------------------------
    How to Create a Pivot Table in Google Sheets?
    Create a pivot table for calculation and in-depth data analysis:
    • Google Sheets | Pivot ...
    -------------------------------------
    Which one to Use? A Pivot Table, or COUNTBLANK Function, to Count Blank Cells in Google Sheets:
    Gives steps to use a pivot table or COUNTBLANK to count blank cells:
    • Google Sheets | Pivot ...
    -------------------------------------
    Here's the format of the QUERY function formula is:
    =QUERY(data, query, [headers])
    Use the WHERE clause and LIKE operator in the query part of the formula.
    LIKE supports % and _ wildcard characters.
    The % symbol means any and all characters preceding and following it.
    The _ symbol means any single character.
    Let's look at some examples:
    Example 1
    Assume C2 to C300 has names of a workshop registrants.
    Say you want to extract names with a middle initial.
    The QUERY function formula with WHERE clause and LIKE operator is:
    =QUERY(C2:C300, "select C where C like '% _ %'")
    Note that because there will be a space between first name and middle name and a space between middle name and last name, there's a space after the first and before the second percentage symbol.
    Example 2
    Let's use the same column range as above.
    Assume you want to extract all names with a middle initial AND names that
    have a period after the middle initial.
    For this task, in addition to the LIKE operator, we have to use the OR boolean operator.
    The QUERY function formula is:
    =QUERY(C2:C300, "select C where C like '% _ %' OR C like '% _. %")
    The formula extracts all names with a middle initial, with or without a period following the middle initial.
    Take a look at this video tutorial, which gives the step to use the Google Sheets QUERY function with the WHERE clause and LIKE operator, with examples.
  • ХоббиХобби

Комментарии •