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

IMPORTRANGE + SUBSTITUTE

I have a spreadsheet "X", this spreadsheet, contains 2 sheets, "sheet1" and "sheet2" On 'sheet2' i have this on the A1 cell (i import from a shared spreadsheet all data that is…
2
votes
1 answer

Google Sheets: How to sum multiple unique criteria

I'm trying to pull only the "Travel" info from this table and sum the unique values based on multiple criteria. For example I want all Uber expenses grouped by Department and Credit Card and have all the Amounts that are in the same department and…
2
votes
1 answer

Google Sheets Import Range + Query combining first rows

I am using a query on import range to pull relevant data from one spreadsheet into another. It was working fine, then all of the sudden it started combining the first 8 rows into one row, but the rest are importing as normal. The columns are spaced…
2
votes
1 answer

In Google Sheets, how to transpose multiple column headers and data into a single column of multiple row labels and data

Not sure what is the proper spreadsheet terminology to word this. How to turn this: +-----------+-----------+-----------+... |Username |First Name |Second Name|... +-----------+-----------+-----------+... |Uname1 |FName1 |SName1 …
2
votes
2 answers

Average over last 7 days formula in google sheets

My 1-year-old son was just diagnosed with Type 1 Diabetes, and I am trying to create a spreadsheet to track his sugar levels etc. I have the dates in column A, and his blood sugar levels in column C. I have been trying for the last couple days to…
2
votes
3 answers

JOIN results of VLOOKUP into one string in Google Sheets

I have following task for my Google spreadsheet: JOIN strings in all cells that are to the right of certain id. To phrase it differently: SELECT A, JOIN(',', B) GROUP BY A, WHERE A = myid; if JOIN was an aggregation function. Or in other words:…
2
votes
1 answer

Import Range Dynamically Based On Size

I'm trying to combine two Google Sheets together using query. For example: =query({'Sheet 1'!A1:D50;'Sheet 2'!A1:D500}) However, the cell range that I would like to combine changes. I've created a function that counts the rows in…
2
votes
2 answers

IMPORTXML function in Google Sheets

Using the IMPORTXML function, is it possible to construct an XPATH query that pulls the Industry value for a given Wikipedia page? For example, the value I want to pull from this page - https://en.wikipedia.org/wiki/Target_Corporation - is "Retail"…
2
votes
2 answers

Calculate the number of elements in each category in Google Sheets

I have a table in Google spreadsheet. It has two columns: students' names and their hobbies. I need to create a separate table (page?) that will calculate the number of students doing each hobby. Example can be found >> here << An additional…
2
votes
2 answers

How to use AVERAGEIFS within ARRAYFORMULA

I am trying to use AVERAGEIFS inside ARRAYFORMULA. Looking at other questions, I have come to the conclusion that it is not possible without using QUERY function. My intention is to average the values of a column whenever they share the same ID. I…
2
votes
1 answer

Google Sheets formula query an array based on matches from another array

I would like to filter/query Columns A:B based on 1 or more values in Column E. Essentially, I want to Return values from ColB for any values within ColA which appear in ColE. I wish I could use this: =query({$B$1:$C$101},"select Col2 where Col1='"…
2
votes
1 answer

How to move data to right empty cells in Google Sheets?

I would like to design an organization chart and I am building a supervisor tree like this. 9 8 7 6 5 4 3 2 1 0 A B C D E F B C By using vlookup I got the table like above. Now I would like the table to be like…
2
votes
1 answer

Query to select a large range of columns without manually entering each column Google Sheets

I am using the solution presented in this post: https://webapps.stackexchange.com/questions/101926/google-sheets-query-to-select-a-large-range-of-columns-without-manually-entering But now I need to query data from a different spreadsheet. I know the…
2
votes
1 answer

dynamic data range from multiple tabs in a google sheet using QUERY function

I'm trying to create a custom function so that I can dynamically return all the tabs within a spreadsheet to use within the QUERY function. So that in the future if I add a new tab of data, I won't need to manually update the function. function…
2
votes
2 answers

How to make select with variable using Google Sheets

I have a Google sheet with several columns, where are recorded support requests from clients. A B C -+---------------+------------------------+------------- 1| Date-1 | John |…