1,162 questions
0
votes
1
answer
44
views
How to use avg on datediff in a single Google Sheets Query?
In a Google Sheets Sheet I have a table with two dates in Column E and F.
I now want to get the average difference between the last 20 dates.
The Query I want to use is the following:
Select avg(...
0
votes
1
answer
96
views
Count values in multiply columns as in single one, group by other column
There is a table with questionary responses. One column (e. g. B) represents respondent's age group (e. g. teenagers / adults). Some other sequental columns contain their answers for a single question ...
0
votes
2
answers
116
views
Google sheet query to sum columns dynamically determined by a multi-choice selection from a dropdown
I have a table in a Google sheet that looks like this:
company
2024Q1
2024Q2
2024Q3
2024Q4
A
$100
$50
$95
$12
B
$200
$35
$54
$9
C
$0
$40
$23
$12
I use data validation to create a dropdown (from a ...
-2
votes
1
answer
86
views
SQL query to sort a lot of data into columns by date [closed]
I am trying to get data with a query in Google Sheets:
I have the following dataset :
Name
Date
Status
John
2025-04-16
Done
John
2025-04-17
Done
John
2025-04-18
Incomplete
James
2025-04-16
Incomplete
...
0
votes
1
answer
75
views
query with date equality comparison not giving the same result as comparing using contains
I have the following 2 queries, which should give the same result but don't. In the example I am showing it is looking at data from another sheet and finding a match where Col 7 has a date of May 30, ...
0
votes
2
answers
126
views
Cannot use WHERE together with other formatting options
I'm using Google Sheet's QUERY function to import data from another tab, add two additional column 'Year' and 'Month' which are generated using column H
=QUERY(earnings!A:J, "SELECT A, B, C, YEAR(...
0
votes
2
answers
89
views
Google Sheets Query - using another query to filter dates
I have the following datasource in a GoogleSheet:
DATE
PROJECTED
BALANCE
01/01/2025
FALSE
$3,824.54
01/16/2025
FALSE
$2,366.39
01/21/2025
FALSE
$3,783.64
01/22/2025
TRUE
$3,750.72
01/28/2025
TRUE
$3,...
-1
votes
2
answers
65
views
Query call via Apps Script returning 0 (zero) instead of Data Range
For some reason, historyQuery2 returns the proper data range, but historyQuery1 returns 0.
function getEventHistory(cS,findAcct) {
// copy filtered values from Events sheet to Client sheet (cS)
var ...
0
votes
1
answer
51
views
Odd QUERY result in Google sheets?
I have a very simple query function in Google sheets, and I cannot understand why I'm getting the result it produces.
=QUERY(A4:C,"SELECT B WHERE A='Active' ")
It returns the data properly, ...
1
vote
3
answers
140
views
How do I do basic date grouping operations in Google Sheets?
I have data that looks like this (sample):
Col A
Col B
Col C
Value 1
Value 2
1/4/24 4:15 pm
Value 3
Value 4
1/4/24 6:30 pm
Value 5
Value 6
1/5/24 2:30 pm
Value 7
Value 8
1/5/24 3:30 pm
Value 9
Value ...
1
vote
4
answers
112
views
How to use date with LIKE inside query?
I've got a google form(which feeds to Google sheets) for users to enter information. One of the fields is a datepicker which has this format mm/dd/yyyy.
I have a workbook with several sheets. One ...
0
votes
1
answer
137
views
Is there a end of week equivalent to EOMONTH() using query?
I want to plot a chart where I can see the issues resolved per month, what do I need to do to have the plot showing issues resolved per week or 2 weeks
Here is my query for getting the issues per ...
-2
votes
1
answer
104
views
Google Sheet Query - Language
Good day! I hope someone can assist me. I'm having an issue with my B6 cell (Morning Shift time),
I think (if I'm correct) this line has a problem but i just can't figure out what's wrong with it.
IF(...
0
votes
0
answers
62
views
Formula to look at one sheet and find the match on another sheet
I have a Google Sheet that I want to update another Google sheet when it finds a match. In the sheet, I have a tab named 'Master Sheet', a data entry sheet with multiple entries with the same data as ...
0
votes
1
answer
143
views
Query formula not grouping properly
I have a google sheet where one tab is the data entry sheet named "
Master Sheet". and I have another tab labeled "Charts/Tables". On the second tab I have a query pulling data ...
0
votes
3
answers
94
views
Why does my Google Sheets query simplificaiton result in an error?
I have a Google sheet question. I use a formula to sum all values of a column that contains keywords in an other column. I use this formula :
=QUERY(Data!A1:I; "SELECT SUM(G) WHERE (LOWER(B) ...
0
votes
1
answer
208
views
How to generate a table with main categories and subcategories with blank rows in Google Sheets
I'm working on a Google Sheets project where I need to generate a summary table from a dataset. The dataset includes columns for categories and subcategories, and I want to create a new table where:
...
0
votes
1
answer
27
views
Query transpose lookup - returning results
Background:
Google Sheets being used.
I have large (>10k rows), of unorganized sheets of data with ID's and values that I am trying to return values for given ID's. I have no ability to order the ...
1
vote
2
answers
790
views
Need to make a Query in Google Sheets from a multiple dropdown list into a cell containing coma separated values
I've got a Google Sheet with data (Columns A,B,C), a dropdown list (E) and source for this dropdown list (G)
https://docs.google.com/spreadsheets/d/1XY5Nfwi-DtXIV7PMkhax_60EpX5puawmUF-fl2qvEqk/edit?...
-1
votes
2
answers
733
views
Compare 2 columns using QUERY function in Google Sheets
I'm comparing 2 columns, where some values are missing from column B (1st column).
Can you please help me how to use =QUERY function to return missing values?
I know that I can use =FILTER, =MATCH, ...
-1
votes
2
answers
78
views
Date base data sheet generation from master sheet
I have one google sheet with two tabs one the master named "All Week Revenue - MasterSheet" where the importrange data will get updated date wise regularly of our sales team. I need the ...
1
vote
2
answers
69
views
Return SUM of all cells that fit TWO CRITERIA related by POSITION
I'm able to use SUMIF to return sum of all cells that fit one criteria:
=SUMIF(DATA!$U$3:$3, "Previous Age",DATA!$U9:9)
However, I'd like to add another criteria: to match $F$2 with 1st ...
0
votes
2
answers
175
views
How to combine multiple query formula results with the same number of columns vertically? [duplicate]
I have a spreadsheet with 31 Day level sheets and a few summary sheets being used for a daily sales report, using which I'm trying to create a legder. For this, I want columns A, B and C from each of ...
0
votes
1
answer
112
views
How to copy selected data from Sheet 1 to Sheet 2 when press a button on Google Sheet?
Select data row from Sheet 1 then press submit to copy to Sheet2
Table on Sheet2 already contains data.
Select Data from Table on Sheet1 by checkbox.
Press the submit button.
Add selected data from ...
-2
votes
2
answers
276
views
Is it possible to show query results in vertical on Google sheet or way to generate them?
I try
=QUERY(Kid," select A where B=2")
on the top cell and
=QUERY(Kid," select B where B=2 ")
on the bottom cell but the top cell said Array result was not expanded because it ...
0
votes
2
answers
78
views
Arrayfomula with filter on entire column
I'm trying to build a Google Sheets formula to have a column that lists an array (can concatenate) of products ordered in the first order of a customer.
So for a any order with the same customer ID, ...
1
vote
2
answers
67
views
Google Sheets query formula partially working
I am making a sheet to pull data from a separate sheet based on user input. I have two named ranges to pull this data from based on a cells value. The front half of the formula works, but the back ...
0
votes
2
answers
87
views
Is there a way to simplify the multiselect query in the google sheets?
The source file contains 17k to 20k rows.
I'm struggling with the speed of calculating, the sheet is unresponsive for 60+ seconds. There are 14 executions of this function per sheet, and 6 sheets ...
1
vote
2
answers
73
views
how to search for a cell and grab the next cell data [duplicate]
I have 2 columns. A and B - there is a list of project names and maybe duplicate (which is Ok) in column A. and there is a list of numbers related to that project name in column B.
I want to look for ...
0
votes
2
answers
226
views
Prevent SPLIT from converting text to numbers in Google Sheets when used in an ARRAYFORMULA?
I have rows of data like so:
a|b|1|c|d
a|b|1, 2|c|d
e|f||g|h
I am using BYROW to split them:
=BYROW(
A2:A,
LAMBDA(
row,
SPLIT(
row,
"|",
...
0
votes
2
answers
50
views
How to retrieve the first row where the date is more recent than x
In Google Sheets we have one sheet called InvoicingPeriods:
A B C
4/26/2024 5/23/2024 - Period 26/04 - 23/05
5/27/2024 6/23/2024 - Period 27/05 - 23/06
6/24/...
-1
votes
1
answer
112
views
Error Importrange Goes Horizontal not vertical (Google Sheet)
I Wanna Ask to solve the error when use google sheet importrange formula, the result goes horizontal not vertical.
Below my code
=QUERY(IMPORTRANGE("1WwKDHs4iovQRDcQGU-5Tf8omCPm3LIFr_XI7x2-A6Ms&...
1
vote
1
answer
42
views
How do I select multiple different counts with different where clauses in Google Sheets query language?
I'm currently trying to select multiple counts with different criteria. Unfortunately, I am getting a PARSE error when I try to combine them into the same query. They work fine individually, just not ...
0
votes
1
answer
304
views
Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: G [duplicate]
I am using the import-range function to pull data from 5 different workbooks into one master sheet.
I am working with a date drop down and need each query to only return the entries that match the ...
0
votes
1
answer
129
views
Google Sheets - how to show sheet name in SELECT result of QUERY() function
In this formula I need to show the Sheetname in the first column, either concatenated to Col1 or it could be the first column, like this.
SELECT SheetName,Col1,Col2,Col3,Col4,Col5
I am not even sure ...
1
vote
1
answer
65
views
Google Query - Sort last column ASC where I don't know the number of columns
I have a query in google sheets:
=query('GA4 - Product Data'!A:N,"SELECT D, SUM(H) GROUP BY D PIVOT N",1)
What I would like to do is sort this data by the final column from the pivot, which ...
0
votes
1
answer
105
views
Creating logs-based alert based on number of rows inserted
I'm attempting to set up a logs-based alert in GCP Log Explorer to monitor a table that receives new records daily. Occasionally, the number of records is low, sometimes below 1000. In such cases, I'd ...
3
votes
2
answers
4k
views
how to QUERY by column name (label, header, variable) in google sheets
As per (poor) google's official QUERY documentation here we can filter our tables by referencing individual columns, for example like:
=QUERY(A:I; "select A,B where D > 9000"; 1)
this ...
0
votes
2
answers
572
views
Using google sheets query functions to filter a list for unique values
I am trying to organize an inventory sheet but need some advice. I have a webhook sending data in regularly. The sheet is below. In the source database, I will update different data fields and then ...
1
vote
1
answer
47
views
Unable to parse query string
I'm trying to use this function, however, it's not working and giving me the error
"Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: A"
I'd appreciate any help!
=...
0
votes
2
answers
57
views
Can you use a QUERY in Google Sheets using OR logic and the =today() formula for a dynamic date in the past?
I am trying to use the QUERY function paired with OR logic and the =today() formula to create a new table from my data set.
The data is on the "DATA" tab and 'QUERY' is on the "QUERY&...
0
votes
1
answer
829
views
Google Sheets - Query Function - Search Using Named Range
I'm making a sheet where I fill in my expenses for each month. I have a tab setup with several columns listed as 'Groceries' or 'Travel' (for example) that are my Named Ranges:
Groceries
Travel
Tesco
...
0
votes
1
answer
96
views
How to pull one row data with query formula which has multiple row
I'm trying to pull data using query formula but the data has more than one row.
here is the example of the data :
[here]:(https://i.sstatic.net/wmJop.png )
as you can see there is year column, i want ...
0
votes
1
answer
47
views
vlookup to select query range
query({A:A,B:B,vlookup()}, "Select Col1, Col2, max(Col3) group by Col1"}
Is there a way to make this work? Trying to avoid a bunch of nested if statements.
Vlookup is returning correct ...
0
votes
2
answers
121
views
QUERY Syntax with multiple cell references
First time posting. I'm having difficulty with the syntax for a query I'm making in Google Sheets, the function is as follows:
=MAX(QUERY({'Fall Scoresheet'!$B$9:$V$2009;'Winter Scoresheet'!$B$9:$V$...
1
vote
1
answer
344
views
Google sheets query issues with splitting comma separated email addresses
I have a google sheet which takes form responses. The bulk of these responses are "which project is it" and "which email addresses are involved ?"
The responses for email address ...
0
votes
1
answer
121
views
Formula Query Multiple Columns with Filter in google sheet
I have two sheets in data google sheet, let's both named is sheet 1 and sheet 2. In sheet 1, I have four columns as below:
And in sheet 2, I have multiple columns and row in below:
If I want to ...
0
votes
2
answers
226
views
Query formula Multiple Columns using "Where", "AND", and Torow
I have multiple sheets in data google sheet, let's both named is sheet 1 and sheet 2. In sheet 1, I have three columns as below:
And in sheet 2, I have three columns in below:
If I want to filter ...
0
votes
2
answers
147
views
Query Multiple Columns with using "Where" and "AND"
I have multiple sheets in data google sheet, let's both named is sheet 1 and sheet 2. In sheet 1, I have three columns as below:
And in sheet 2, I have three columns in below:
If I want to filter ...
0
votes
2
answers
2k
views
Google Sheets Query match multiple numbers
This article explains that SQL IN is not available in Google Query, so it recommends using "matches" separating the parameters with vertical bars, like so: =QUERY($A$1:$B,"SELECT A ...