0
0
Google Sheetsspreadsheet~10 mins

SELECT clause in Google Sheets - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This table shows a list of people with their names, ages, and cities.

CellValue
A1Name
B1Age
C1City
A2Alice
B230
C2New York
A3Bob
B325
C3Los Angeles
A4Charlie
B435
C4Chicago
Formula Trace
=QUERY(A1:C4, "SELECT A, C", 1)
Step 1: QUERY(A1:C4, "SELECT A, C", 1)
Step 2: Extract column A (Name) values: ["Name", "Alice", "Bob", "Charlie"]
Step 3: Extract column C (City) values: ["City", "New York", "Los Angeles", "Chicago"]
Step 4: Combine columns A and C side by side
Cell Reference Map
    A       B          C
1 | Name  | Age  | City      |
2 | Alice | 30   | New York  |
3 | Bob   | 25   | Los Angeles|
4 | Charlie| 35  | Chicago   |

Formula references range A1:C4 for data.
The formula uses the data range A1:C4, referencing columns A and C for the SELECT clause.
Result
    A       B
1 | Name  | City      |
2 | Alice | New York  |
3 | Bob   | Los Angeles|
4 | Charlie| Chicago   |
The result shows only the Name and City columns from the original data, as selected by the QUERY formula.
Sheet Trace Quiz - 3 Questions
Test your understanding
What columns does the formula =QUERY(A1:C4, "SELECT A, C", 1) return?
AColumns A and C
BColumns A and B
CColumns B and C
DAll columns A, B, and C
Key Result
QUERY(range, "SELECT columns", header_rows) selects specific columns from a data range.