How to Insert Blank Columns in Output using Query function
To insert blank columns in the output using the Query function in Google Sheets, you can use an empty string in the SELECT statement. Here's how to do it:
- Open your Google Sheet containing the data.
- In an empty cell, type the QUERY function.
- In the SELECT statement, use an empty string
""
to represent a blank column. You can add it in between the columns you want to separate with a blank column.
Here's an example:
Example
Suppose you have the following data in cells A1 to C4:
Name Age City
John 25 New York
Jane 30 Los Angeles
Doe 22 Chicago
To insert a blank column between the "Age" and "City" columns, use the following QUERY function:
=QUERY(A1:C4, "SELECT A, B, '', C")
The output will look like this:
Name Age City
John 25 New York
Jane 30 Los Angeles
Doe 22 Chicago
As you can see, the blank column has been inserted between the "Age" and "City" columns.
Did you find this useful?