Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [google-sheets-query]

Use for questions about QUERY built-in function from Google Sheets.

0
votes
2answers
1k views

Query reference to several sheets

I have this formula: =ArrayFormula({query(query({A3:D,value(B3:B)}, "select Col1, sum(Col5), count(Col4), sum(Col3) where Col1<>'' group by Col1 ...
1
vote
2answers
21 views

SUM columns from other sheets and group by month, but also show the individual sheets values before doing SUM

Currently, I have a spreadsheet which has a number of customer sheets, each with a pivot table showing the month in the row I and the total income for each month in row L. On a separate sheet I have ...
2
votes
1answer
146 views

Aggregate results by week and month for charts

Is there a way to convert daily values into weekly averages for charting? Sample source sheet --------------------------------------------------- | Data 1 | 1/1/2018 | 1/2/2018 | 1/3/2018 | etc......
0
votes
1answer
44 views

Using array formula in Google Sheet

Trying to make an ARRAYFORMULA that executes a query function which takes a reference to the current position of the row number and the specified column name. This is my version of formula: =...
1
vote
1answer
12 views

How to join VLOOKUP results of multiple sheets into one cell

I am trying to use TEXTJOIN across multiple sheets, IF a cell is is the same I would like it to return the value from another cell in all sheets that are associated with it. In this example, I am ...
0
votes
3answers
117 views

Reverse QUERY in chronological order from two standalone spreadsheets

I have a report that pulls data from a separate sheet using a QUERY. The report has a "notes" column (not part of the query) so users can add notes associated with a particular row. This solution ...
1
vote
2answers
663 views

QUERY error for BY column

I'm using the following query to pull data from one sheet into another. =query(data!B2:CL,"select B, C, D, E, F, G, H, I, J, BB, BZ, CA, BA where J = 'Industry Certification'",false) The above query ...
2
votes
1answer
134 views

Find column headers then do multi-criteria lookup

I'm trying to create a report where I need to find each column by header, then do a multi-criteria lookup. (I need to find the proper column because the data file is a csv export from another ...
0
votes
2answers
26 views

How to group data (by row and column) in a Google spreadsheet?

I have data as follows: Name | Value | Y/N | Value | Y/N A | 10 | Y | 12 | N B | 100 | Y | 120 | N A | 20 | Y | 10 | Y B | 200 | N | 120 | Y C | 1000 |...
1
vote
1answer
15 views

How can I create a unique list of data across multiple rows AND columns?

Google Sheets has a UNIQUE() function which when given a column of values, will output a column of all unique values. This works well for column-specific data, however, you have multiple columns and ...
1
vote
1answer
16 views

Problem combining LEFT() and QUERY() functions

I'm currently working in Google Sheets and I need to import a part of a row from a spreadsheet to another. I'm importing the row with the QUERY() function and "cutting" the data from the row with LEFT(...
0
votes
1answer
31 views

Google Query, change select columns based on cell reference?

I am trying to improve a manual process that requires filtering through the input from a Google Form. It would be great if we could filter each question individually, without building multiple queries....
1
vote
1answer
23 views

How do I use the multiply line results from query or filter to get other values from an unsorted sheet?

I'm trying to take the results of a filter with multiple lines and use that results to acquire info from another sheet. Specifically, I'm trying to acquire Quantities in Customer Order sheet using ...
0
votes
3answers
21 views

Select last entry from spreedsheet

So I have a Google Form dumping data into spreadsheet tab form responses 1. I have created another tab labeled summary. I need to have the summary tab only show the latest entry for a given pilot ...
0
votes
1answer
25 views

Add numbers to results of Google Sheets query

Is it possible to add a column of numbers to the results of a query? It would be nice to have a number (from 1 to n) next to each records returned from a query.
0
votes
0answers
16 views

Regex Matching for Google Sheets Query Formulas

I'm trying to return a limited list of cells using a query that references another tab in my Google Sheets book. Please find a sample book here. The returned cells represent social media posts -- I'm ...
-1
votes
3answers
1k views

Query with OR statement in Sheets

I'm trying to get a query working and so far this works: =QUERY({Sheet1!A2:G; 'Sheet2'!A2:G; 'Sheet3'!A2:G;'Sheet4'!A2:G}, "where Col1 is not null order by Col1 asc") When I add the second condition ...
1
vote
1answer
18 views

Combining 3x IMPORTRANGE with dynamic range

I have 3 Google Sheet and want to combine all of them with: Sheet 1: 480 rows Sheet 2: 40 rows Sheet 3: 20 rows The sheet keeps expanding by the day since the sheet's data comes from a Google Form ...
0
votes
1answer
31 views

How to remove duplicate rows based on a column (leaving first one out) in Google Spreadsheets

I am trying to remove duplicates from my Google spreadsheet file. Here is an initial table example A B C D HelloWorld1 2 6 41 HelloWorld1 4 3 5 HelloWorld2 6 46 6 ...
1
vote
3answers
34 views

Pulling data from one sheet to another if

My knowledge is pretty basic when it comes to excel and Google Sheets. I'll explain what I'm trying to do. I'm trying to find a way to filter information from 1 sheet to another in Google Sheets. ...
0
votes
2answers
21 views

Google Sheets Lookup For Nth Value

I am working on a spreadsheet that seeks to collate scores to a team. There is an input table where team and score start next to each other (see the example sheet linked below) into a table with each ...
0
votes
1answer
14 views

Google Sheets Using Countifs & Unique Together

I am trying count the number of unique clients of Payroll service who are Won. The answer as per the table below should be 4. How can I achieve this, given that the table will be dynamic?
0
votes
1answer
52 views

Date Query in Google Sheets with importrange

I have two tables. Table A= Customer Feedback Table B= KPI In Table A I have a column for a date with format mm/dd/yyyy and in Table B I have 2 columns as from date and to date with the format. I ...
1
vote
2answers
31 views

Using QUERY and IMPORTRANGE to pull records from a specific date range

I have created two spreadsheets. This one is my source data: https://docs.google.com/spreadsheet_A And I would like this one to just be the people who are currently here (so Column D < today and ...
2
votes
1answer
21 views

Aggregate values based on categories and subcategories

I am trying to create a document which automatically tracks spending based on two categories. For example, I have a sheet formatted similar to the table below: Type | Amount | Category ...
1
vote
1answer
298 views

In Google Sheets Query Max Date from Dates in Column A for a particular Project ID stored in Col B in Tab 'Data' from Tab 'Main'

Tab Data is as under Date_A Project_ID 01-May-18 EL-PR-18-08709-1 02-May-18 EL-PR-18-08709-1 01-May-18 EL-PR-18-08709-1 03-May-18 EL-PR-18-08709-1 02-May-18 EL-PR-18-08709-1 01-May-18 ...
2
votes
2answers
529 views

Google Sheets Query - True/False/Other

I'm trying to get a query based on a tri-state. The possible values are TRUE, FALSE, 'Ignore' or blank. I want this to select all names (B) and emails (C) where a flag column is set to False or ...
1
vote
1answer
17 views

Query Importrange with multiple values

This formula is working fine, but I need to add in other teams into Column A. I would need to return ATT SLC, ATT Orem, and ATT Scottsdale within this same range, but I'm not sure the language to use ...
1
vote
1answer
352 views

Querying multiple ranges from form responses to new sheet

Recently, someone on this forum put together a formula for me. It works on a sheet pulling responses from a google form. I'm trying to model a new one after that but I'm having trouble. The working ...
1
vote
1answer
678 views

Query: select cells in column where it is not null

I am trying to pull non null data from a column. I have tried the following. Each import range works independently. =query({IMPORTRANGE("KEY", "Sheet!A4:A34"); IMPORTRANGE("KEY", "Sheet!A4:A34"); ...
1
vote
1answer
103 views

Google sheets query: how to select column twice in query

I have a query that is really long (about 50 columns), I don't want to split into 2 queries. But I want a column to show up twice. Is there a way to do this? below is a simple example that doesn't ...
1
vote
1answer
21 views

Query Not Showing Certain Positive Values [duplicate]

I'm attempting to import some data to my Google Sheet. Using QUERY to reshape my data, an example code of what I am trying to import is as follows: =query(importhtml("http://statfox.com/cbb/cbbteam....
3
votes
2answers
1k views

Google Sheets Query(Importrange) with named range?

I am looking for a way to query an imported range using named range. Something similar to this, however I cannot makeit to work Sheet ID#A has a column J whose named range is "Signed" that may ...
0
votes
1answer
299 views

Google sheet - get crypto currency price from Cryptobridge Exchange API

How can I retrieve only the price from this API in a Google spreadsheet? This is the API ticker - https://api.crypto-bridge.org/api/v1/ticker For example, if I use this function =INDEX(IMPORTDATA(...
0
votes
1answer
20 views

Google Sheets Query Searching?

I'm trying to run a Query on some data that's being imported, and have it only Bring data over that matches the Email in the document. This is my code: =QUERY(IMPORTRANGE("SHEET ID REMOVED","'Form ...
0
votes
1answer
56 views

Arrayformula and Sum queries. Possible alternatives

I am using a sheet to list and summarise teachers absences and substitutions. Here's the worksheet Basically in the sheet "Substitutions" all absences and substituions are stored record by record: ...
1
vote
1answer
215 views

Query based on column header in Google Sheets

I am trying to automate Worship list using Google Sheets, so it works good but one thing I can't do can be more than useful. I have a sheet like this: in row 1 dates and below songs used that Sunday....
0
votes
1answer
27 views

Split rows dynamically based on row length (COUNTA) and transpose to 2D array

I have data in this format: And I need it to be reformatted into this: Basically, each row in the initial format is composed of 4 concatenated sections of equal lengths: Part(s), Product(s), Quant(s)...
5
votes
1answer
905 views

COUNTIFS returns incorrect result when applied to the output of QUERY

In my spreadsheet the chart for Negative Feedback weekly pulls data from the Query sheet, but the logic doesn't work to separates negative feedback from positive feedback. The logic works fine on the ...
1
vote
1answer
3k views

Dynamic query select function based on a cell reference

I have several queries. Each week they need to shift one column right, C to D then E...W. I currently manually change C to D in all my queries and I want to simplify. A couple of examples: select B,...
0
votes
2answers
234 views

How can you use a function and pass it a column inside a Google Sheets Query?

On Sheet 1, I have data CATEGORY | PATIENT | DATE | AMOUNT Vision | Joe | 1/1/2016 | $100 Vision | Joe | 1/2/2016 | $100 Vision | Joe | 1/3/2016 | $...
0
votes
1answer
93 views

Standard deviation in Google Sheets Query

I have data of jobs (A), their executions (B) and duration (C) in my Google Sheet. I have already calculated the average duration of each job with Query language: SELECT A, B, AVG(C) GROUP BY A, B ...
1
vote
1answer
461 views

Query returning results into merged cells in Google Sheets

Short Question: I have a query function returning an array over merged cells. Instead of displaying all of the values in the array, some of the data is hidden in merged cells where only the first ...
0
votes
1answer
104 views

QUERY remove column and column header if blank

The attached document is a time-sheet document. There are 2 tabs, TimesheetData and InvoiceData. I want to pull through data from TimesheetData tab to the InvoiceData tab using a query. The query I ...
1
vote
0answers
54 views

Calculate Percentage with QUERY on Google Sheets

I have a Google Sheets database like this: Name | Value | Answer A | 100 | Y B | 200 | N C | 10 | Y A | 100 | N A | 1000 | Y B |...
0
votes
1answer
71 views

Google Sheets intersection query

I'm trying to write an intersection query in Google Sheets that lists all the rows in sheet 1 that contain a cell in sheet 1, column A, that matches at least one cell in sheet 2, column P This is the ...
0
votes
1answer
56 views

Replacing Query output string when the count is less than 3

Given the reference table below: Date Location 11/29/2018 Office A 11/29/2018 Office B 11/27/2018 Office C 11/27/2018 Office A 11/27/2018 Office A 11/24/2018 Office C 11/24/2018 Office ...
1
vote
1answer
84 views

Collated and separated results in one cell for QUERY results across multiple columns

In a Google Sheet I have the following formula: =CONCATENATE(QUERY(Summary!I4:U200,"Select I,U where S='"&A3&"'")) This currently returns each pair of results in sequence (with no spaces) ...
0
votes
0answers
21 views

Query Google Spreadsheets select Min and Max dates as Column

I have a large row data sheet with several dates by company, and I need to calculate at column level the leadtime (max date - min date). Raw Data Source: --------------------------------------------...
-1
votes
2answers
5k views

Google Sheets 'QUERY' won't display cell text if other cells have numbers

I'm not sure what is happening in my Google Sheet query and could really use some help. I have a quick screencast that demonstrates and explains the issue. Basically, I'm using a query to pull data ...