Reading the documentation for the
=QUERY function1, 2, 3, some of it seems to imply that I should be able to use column headers directly in my query. For example, the
=QUERY function takes a third optional parameter,
HEADERS, which lets you specify a number of header rows.
Most of my queries would be a lot prettier if I could use column headers, thus not having to use column indexes, but I'm not able to make it work.
A B C --------------------- Name Phone City Vidar 12345678 Oslo Rupert 32165487 Berlin
I'm able to query this by using column indexes:
=QUERY(Sheet1!A1:C; "select A, B, C where A = 'Vidar'"; 1)
... but not using column headers:
=QUERY(Sheet1!A1:C; "select A, B, C where Name = 'Vidar'"; 1)
... this gives me Error: Invalid query: Column [Name] does not exist in table
Is it at all possible to use column headers like this? If not, what is the purpose of the