Table of Contents
Google Sheets Query is a powerful tool that allows users to extract and manipulate data from their spreadsheets. In order to ensure accurate and relevant query results, it is important to set it up to ignore blank cells. This can be achieved by using the “where” clause in the query formula and specifying the criteria as “is not null”. This will filter out any blank cells in the selected range, thus providing a cleaner and more accurate set of results. By ignoring blank cells, users can avoid any potential errors or inconsistencies in their data analysis.
Google Sheets Query: Ignore Blank Cells in Query
You can use the following methods to ignore blank cells in specific columns when performing a Google Sheets query:
Method 1: Ignore Blank Cells in One Column
=QUERY(A1:C11, "select * where B is not null")
Method 2: Ignore Blank Cells in Multiple Columns
=QUERY(A1:C11, "select * where B is not null and C is not null")
The following examples show how to use each formula in practice with the following dataset in Google Sheets:

Example 1: Query Rows & Ignore Blanks in One Column
We can use the following formula to select all rows where the Points column is not blank:
=QUERY(A1:C11, "select * where B is not null")
The following screenshot shows how to use this formula in practice:

Notice that only the rows where the Points column is not blank are returned.
Example 2: Query Rows & Ignore Blanks in Multiple Columns
We can use the following formula to select all rows where the Points column and the Assists column is not blank:
=QUERY(A1:C11, "select * where B is not null and C is not null")
The following screenshot shows how to use this formula in practice:

Notice that this query only returns the rows where the Points column and the Assists column is not blank:
Additional Resources
The following tutorials explain how to perform other common tasks with Google Sheets queries:
Cite this article
stats writer (2024). How can Google Sheets Query be set up to ignore blank cells in the query results?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-google-sheets-query-be-set-up-to-ignore-blank-cells-in-the-query-results/
stats writer. "How can Google Sheets Query be set up to ignore blank cells in the query results?." PSYCHOLOGICAL SCALES, 28 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-google-sheets-query-be-set-up-to-ignore-blank-cells-in-the-query-results/.
stats writer. "How can Google Sheets Query be set up to ignore blank cells in the query results?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-google-sheets-query-be-set-up-to-ignore-blank-cells-in-the-query-results/.
stats writer (2024) 'How can Google Sheets Query be set up to ignore blank cells in the query results?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-google-sheets-query-be-set-up-to-ignore-blank-cells-in-the-query-results/.
[1] stats writer, "How can Google Sheets Query be set up to ignore blank cells in the query results?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can Google Sheets Query be set up to ignore blank cells in the query results?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
