Google Sheets Query: How to Remove Header from Results


You can use the following formulas to remove the header labels from the results of a Google Sheets query:

Method 1: Remove Header from One Column

=QUERY(A1:C7,"select A, sum(B) group by A label sum(B) ''")

This particular example removes the header from the second column of the query results.

Method 2: Remove Header from Multiple Columns

=QUERY(A1:C7,"select A, sum(B), sum(C) group by A label sum(B) '', sum(C) ''")

This particular example removes the header from the second and third column of the query results.

Method 3: Remove Header from All Columns

=QUERY(QUERY(A1:C7, "select A, sum(B) group by A", 1), "select * offset 1", 0)

This particular example removes the header from all columns of the query results.

The following examples show how to use each formula with the following dataset in Google Sheets:

Example 1: Remove Header from One Column

We can use the following query to return the sum of points scored by each team and remove the header label from the sum of points column:

=QUERY(A1:C7,"select A, sum(B) group by A label sum(B) ''")

Google Sheets query remove header from results

Notice that there is no header label for the sum column.

We effectively replaced the label that would have been sum Points with a blank label instead.

Example 2: Remove Header from Multiple Columns

We can use the following query to return the sum of points and sum of assists by each team and remove the header label from each of the summed columns.

=QUERY(A1:C7,"select A, sum(B), sum(C) group by A label sum(B) '', sum(C) ''")

Notice that there is no header label for the sum of points or sum of assists columns.

Example 3: Remove Header from All Columns

We can use the following query to return the sum of points scored by each team and remove the header label from each of the resulting columns:

=QUERY(QUERY(A1:C7, "select A, sum(B) group by A", 1), "select * offset 1", 0)

Notice that there is no header label for any of the resulting columns.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets

Google Sheets Query: How to Query From Another Sheet
Google Sheets Query: Select Rows that Contain String
Google Sheets Query: How to Use Group By

Leave a Reply

Your email address will not be published.