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
-1
votes
1 answer

How to importrange dynamically based on dropdown/variable

I'm trying to dynamically retrieve all rows where a status = [Dynamically chosen value] from a drop down list. below you can see my current formula: =query(IMPORTRANGE("https://example.com", "Tracker!A1:V"), "select * where Col7 = 'B1' ") Here is…
-1
votes
2 answers

How to group and add similar items with a unit of measurement

I have the following spreadsheets. I need to compact the contents of this spreadsheet. I was wondering if it is possible to group similar items such as 1952 and add the numbers in the next column and output something along 5m / 2w or similar? 1951…
-1
votes
1 answer

Why is my Google Sheets query repeating row headers down the page, and not the data contained in the header?

I'm trying to avoid selecting "A,B,C,D" etc because I need to reuse this formula in several different pages at different column locations. I'm also not using the "*" because I need to avoid a col in the data. The problem right now is that when I…
-1
votes
1 answer

Using indirect function to refer to a concatenated import ranges for query function

Below is my query function in its original form: =ArrayFormula(query({importrange("1yqTUmJcL6YxgOpfHS5Pt9nYnmpiqN3tUPQP7-Rp8xis","CPG!A2:L20");importrange("1yqTUmJcL6YxgOpfHS5Pt9nYnmpiqN3tUPQP7-Rp8xis","PUB!A2:L20")},"Select Col5, Sum (Col4) where…
cokenol
  • 19
  • 7
-1
votes
1 answer

Google sheets - query cell value contains value in comma separated cell

I'm trying to query a group of say fruits so I'm grouped these into a comma-separated cell and I want to query that cell but I don't get any results. When I just one value in that cell says Apple it wants a result. I thought using contains would…
Grimlockz
  • 2,541
  • 7
  • 31
  • 38
-1
votes
1 answer

Query that returns results that are at least a week apart

I have a google sheets spreadsheet that has lots of user data, timestamped. This data is entered into the google sheet by administration AND end users via a google form, so the data points don't come in at regular intervals. I want to be able to…
d90
  • 767
  • 2
  • 10
  • 28
-1
votes
2 answers

Google sheets double query with selecting cell value as an explicit where condition

I have the following dataset: Start day End Day Product ID Sells Unites 01/11/2018 08/11/2018 Blue DA_1000 $55,555.00 12 01/11/2018 08/11/2018 Red DA_1000 $1,321,321.00 55555 01/11/2018 08/11/2018 Blue DA_1000 $444.00…
Rapha
  • 23
  • 6
-1
votes
1 answer

Google Sheet: Reference cell inside importhtml query

I am trying to using the following formula to import a table from ESPN: =QUERY(IMPORTHTML("http://games.espn.com/ffl/schedule?leagueId=2127","table",2),"SELECT * WHERE Col1 = "&B3&"") Basically, I only want to return rows that contain the value…
-1
votes
1 answer

What is the most optimal way to filter dataset to cell value and array?

Here's the formula that I'm starting with: =arrayformula(if(isblank(H1:1),"",query(A2:C,"Select C where A = "&F1&" and B = '"&$H$1:$1&"'"))) However, it's not referencing the date value in the query the way I am expecting it to, based off of the…
swolfe2
  • 429
  • 1
  • 6
  • 24
-1
votes
2 answers

How to load Google sheets data to Google Cloud MySQL?

I have a dataset in Google sheets which frequently gets updated. I would like to push updates to google cloud MySQL.
-1
votes
1 answer

uploading hierarchical data to firebase from google sheets

I am trying to upload data to firebase where the structure of my database is hierarchical. How can I manage that structure in google sheets. I have been looking for this on many websites but found nothing. Please help. Here is the structure of my…
user8412759
-1
votes
1 answer

Percentage Formula - GOOGLE SHEETS

I now have a new keyboard (Thanks Ken White) I need the following Percentage Formula: If M7 is a percentage (eg 15%). Then I want N7 to display 15% of the number in B7. I've been working at this for many hours (tutorials, etc.) - it seems like it…
Dabrun
  • 1
  • 2
-1
votes
3 answers

Output a normalized column with a calculated field in QUERY

In Google Spreadsheet, I have the expression: =QUERY(database; "select b,c, where a='anyone-condition' order by c desc";-1) The column a,b are strings and c is a number. How can I include in this query one calculated field, c/sum(c)?
-1
votes
1 answer

QUERY Google Sheet not remove headers

I am using this formula: =QUERY(gis_sources!$B$2:$L$3008;"SELECT SUM(J)/SUM(I) WHERE (B = 'i.bat' AND MONTH(C) = 7)") But it gives me this header row: How can I remove the header?
-1
votes
1 answer

Google Sheets Query combining data source

I don't know why but when put two sources in QUERY command, I get #ARG! error. Can somebody tell me why? https://docs.google.com/spreadsheets/d/1jzhsqVD5oeokraoKcu4C2AnnlzBBVvbD_lONBKrgk-I/edit#gid=387365472
Peter222
  • 154
  • 1
  • 16