Questions tagged [google-sheets-query]

Use for question about the QUERY function of Google Sheets.

Use this tag for questions about the QUERY function of Google Sheets.

QUERY is a non-standard spreadsheet function. It uses Google Query Language

It could be used together with

Usually it will not be used with

1444 questions
143
votes
9 answers

Google SpreadSheet Query: Can I remove column header?

I'm doing this query at my google spreadsheet: =QUERY(H4:L35;"select sum(L) where H='First Week'"; -1) But it returns a little table with "sum" as header and result below it. What I want is just the result! How I remove header? Can I?
67
votes
9 answers

QUERY syntax using cell reference

I'm having trouble figuring out a fairly simple QUERY statement in Google Spreadsheets. I'm trying to use a cell reference instead of static values and I'm running into trouble. Below it the code I'm using, but I keep getting a "Error: Formula parse…
Mr. B
  • 2,677
  • 6
  • 32
  • 42
59
votes
4 answers

Google Sheets: How to replace text in column header?

I have a query like this =QUERY(B2:C9; "select (C * 100 / B) - 100") in my Google Sheets. What is displayed as a column header is: difference(quotient(product(100.0()))100.0()). I want to put a human readable description there instead. How can I…
Guillaume Perrot
  • 4,278
  • 3
  • 27
  • 37
23
votes
2 answers

Google spreadsheet Query Error - column doesn't exist

Another problem with Google Spreadsheet API. I'm trying to use QUERY() function in order to get all customers from our database who are from Warsaw. Google API seems however to have a big problem with parsing my query. I've checked it few times and…
KamilG
  • 251
  • 1
  • 3
  • 5
19
votes
5 answers

Using MIN() inside ARRAYFORMULA()

I've seen some examples of using SUM() inside an ARRAYFORMULA() in Google Spreadsheets (and oddly enough, they all seem like workarounds) but I can't figure out how to apply them to using MIN() instead. Let's say I have columns A, B and C and I just…
14
votes
4 answers

Google Sheets query doesn't display all values

I have a Google Sheet with the following query formula: =QUERY('Contact Changes'!B1:T,"SELECT C,D,E,F,G,H,I,J,K,L,M,N,O,R,S WHERE T='RMT'") The source sheet displays the following results when filtering column T by RMT. So, the Query formula should…
davids
  • 5,397
  • 12
  • 57
  • 94
12
votes
1 answer

In Google Sheets, How do I find the row number of a cell with certain text in it?

In Google Sheets, What do I do if I want a cell to display the row number in which a certain word/line of text appears? So, I'm working with two kinds of spreadsheets here: One has the number of "Competitors" (which I'm looking for) in the 7th row…
Maxwell Ryan Fuller
  • 475
  • 1
  • 4
  • 11
12
votes
2 answers

How to use CONCAT in QUERY?

I have a table: A | B | C BEN | MOSKOW | YES ANTON | IRKUTSK | NO VIKTOR | PARIS | YES BEN | PARIS | YES ANTON | TORONTO | NO DON | TORONTO | YES ANNA | IRKUTSK | YES BEN | MOSKOW …
11
votes
1 answer

Google Sheets Queries and 'not in'

I am trying to piece together a query that does a few things. One, I want it to list out all the names in a column, and two, I only want it to list out the name from that column if it doesn't exist within an array of columns. …
10
votes
3 answers

Getting the count and unique values of a column of comma separated values?

Supposing all I have is the column A below + + A | B | C +--------------|---------|----------+ | | X, Y, Z | X | 3 | | X, Z | Y …
9
votes
1 answer

Google sheets query - Cartesian join between two ranges

How can we achieve the following join between two ranges on Google Spreadsheet using the query function? Range 1 Model Style Nissan Coupe Nissan Truck Honda Sedan Honda Hatchback Toyata Truck Honda Coupe Range 2 Style Engine Coupe …
9
votes
2 answers

How to query multiple sheets and merge the data?

I have 15 sheets that use the same template, for 15 different users. I would like to make a query on all the sheets, and display the result in a separate sheet: =QUERY(Mona!A3:U300; "select A, D where C != ''") Where Mona is the name of 1 of the 15…
Kenci
  • 4,794
  • 15
  • 64
  • 108
8
votes
4 answers

Google Sheets: extract one column of a named range

update My original question was about taking the average of a single column of a named range. But upon reflection, the question generalizes to "how do I extract a single column from a named range?" original question I'm using a named range to…
fearless_fool
  • 33,645
  • 23
  • 135
  • 217
8
votes
2 answers

ImportRange Function to Ignore Empty Cells

I want to import a range from another Google sheet, but to ignore empty cells so that the data prints back to back (versus having big gaps created from importing empty cells). Here is my formula (Google link changed for…
7
votes
1 answer

Problems with Query Command ORDER BY in Google Sheets

I'm working with one Spreadsheet named "geral" (General, in Portuguese), where I saved all informations and the column A saves the Names of the people. I created another sheet just to see some columns from 'Geral' Sheet, and I entered the following…
Michel Sender
  • 71
  • 1
  • 1
  • 3
1
2 3
96 97