Error Query completed with an empty output - google-sheets

=ARRAYFORMULA(QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1I57M2dP-q_fL5YCNJwAxPmkmdPV1e8SoESWvYGhsfW4/edit#gid=0%22,%22PROCESS REJECT!A3:N"),"select Col2,Col3,Col4,Col5,Col8,Col11 where Col3 = '"&A1&"'")) I am trying to get the data from this cell that acts like a search bar and output that data in this sheet
I am trying to get the data from this cell that acts like a search bar and output that data ienter image description heren this enter image description here

Please try this out:
=ARRAYFORMULA(QUERY(IMPORTRANGE("1I57M2dP-q_fL5YCNJwAxPmkmdPV1e8SoESWvYGhsfW4","PROCESS REJECT!A3:N"),"select Col2,Col3,Col4,Col5,Col8,Col11 where Col3 = "&A1&""))

first use:
=IMPORTRANGE("1I57M2dP-q_fL5YCNJwAxPmkmdPV1e8SoESWvYGhsfW4"; "PROCESS REJECT!A3")
connect your sheets and then use:
=ARRAYFORMULA(QUERY(IMPORTRANGE(
"1I57M2dP-q_fL5YCNJwAxPmkmdPV1e8SoESWvYGhsfW4"; "PROCESS REJECT!A3:N");
"select Col2,Col3,Col4,Col5,Col8,Col11 where Col3 = "&A1*1; ))
this will work only if your column C is numeric. you can check this like:
=ISNUMBER(IMPORTRANGE("1I57M2dP-q_fL5YCNJwAxPmkmdPV1e8SoESWvYGhsfW4"; "PROCESS REJECT!C3"))

Related

GOOGLE SHEETS - If a cell contains text from a list... display corresponding text`

I have
a list of addresses in column A, List of states in Column D.
I would like to search the text in a cell, if it contains a certain state then return the state value based on the List.
Please see screenshot
Thank you in advance for the help!
screenshot here
https://docs.google.com/spreadsheets/d/1f5-poZ3osC67r77IcfUUvlH5g3kEqvJCjy_aU5X-0A0/edit?usp=sharing
You can try below formula-
=ArrayFormula(IFERROR(FILTER($D$2:$D$5,ISNUMBER(SEARCH($D$2:$D$5,A2))),"No State Found"))
As per your given sheet, try below formula-
=IFERROR(QUERY(TRANSPOSE(SPLIT(A2," ")),"select Col1 where Col1 matches '" & TEXTJOIN("|",TRUE(),$E$2:$E) & "'",0),"No state found")

Google Sheets QUERY statement: order by average

I have this Google Sheet with a query formula in it. I am trying to use the query to display an average 1-5 satisfaction rating for each program. This script I adapted from Info Inspired - see "formula 1" - is basically working using the following formula in cell A2:
=query(ArrayFormula('Form Responses 1'!B2:E),"Select B,Avg (E) group by B label Avg(E)''")
However, this is displaying the results ordered alphabetically by program.
How can I order the output by the average rating currently in column B of the image?
I tried using the order by clause as in:
=query(ArrayFormula('Form Responses 1'!B2:F),"Select B,Avg (F) group by B label Avg(F)'' order by Avg(F)")
and
=query(ArrayFormula('Form Responses 1'!B2:F),"Select B,Avg (F) group by B label Avg(F) order by Avg(F)''")
but both gave me:
Error Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "order" "order "" at line 1, column 44. Was expecting one of: "format" ... "options" ... "," ...
I am not sure what the '' is doing, but the first query mentioned only works with it in there.
try it like this:
=QUERY(QUERY(ARRAYFORMULA('Form Responses 1'!B2:E),
"select B,Avg(E) group by B label Avg(E)''", 0), "order by Col2 asc", 0)
'' is literally nothing eg. empty label

IMPORTRANGE: value missing?

I have been working on this issue for a few weeks now and can't seem to find a solution. I used this answer (IMPORTRANGE with CONDITIONS) to get as far as I could, but I keep getting a value error.
This is the sheet I'm working with.
My goal is to use the first tab in the sheet (All Games) to enter all the games that I come across to create a compendium. But, then I want it to automatically populate the other tabs based on certain criteria (what type of game, skills learned, etc.)
On the Warm-Ups tab you'll see the formulas I have tried. A1 is the most recent.
Here is the formula I tried:
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1F64PMg_iFu-DaJAUaE4BkpqF4zoteknp56VfwAUe8ag/edit#gid=1359689553", "All Games!A1:A1300"),"SELECT Col1 WHERE (Col2 = 'w') ")
I am getting a value error:
Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: Col2
you are trying to reference Col2 but you selected range A1:A1300 which is just 1 column. therefore try:
=QUERY(IMPORTRANGE("1F64PMg_iFu-DaJAUaE4BkpqF4zoteknp56VfwAUe8ag", "All Games!A1:B1300"),
"SELECT Col1 WHERE (Col2 = 'w') ")
from the brief look on your sheet, you may want use matches or contains instead of = in your QUERY
You are only importing (part of) ColumnA - so no wonder Google can't find a second column :)

Error parsing query from another page using current page data

I'm attempting to use data on another page (scholar progress reports) to match columns in a current page (copy of results).
Using the formula below:
=QUERY('Copy of Results'!$A$2:$I$999, "select D where A="&'Scholar Progress Reports'!A158&"")
Is producing the following error:
"Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: test"
where 'test' is the value of the cell I'm trying to match on the current page.
Assuming 'test' is in cell A158 of the same sheet, the query is used, try:
=QUERY('Copy of Results'!$A$2:$I$999, "select D where A='"&A158&"'", 0)
Else, try
=QUERY('Copy of Results'!$A$2:$I$999, "select D where A='"&'Scholar Progress Reports'!A158&"'", 0)
My immediate thought is exactly what the error says "NO_COLUMN: test". In your formula, are you trying to select a column, or something like that, called "test" instead of using the names "A", "B", etc.?
If that's not it, do you have a sample sheet?
THIS may also help.

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 an example where you can see what I'm trying to do (Status is A1, and A2 is the formula grabbing all rows from another sheet)
If I select the "A1" in the formula is brings up "In Progress" so it appears to be referencing the correct value, but it doesnt work unless I explicitly write the status into the formula as a text object..
As noted below:
to use cell references, you have to escape them using '"&cell&"'
QUERY(IMPORTRANGE("your_url","your_sheet!your_range"),"Select * where Col7 = '"&A1&"'",0))

Resources