I am trying to filter a Google sheet with columns A to O using a query on a second sheet. I can put this formula in a new sheet and it pulls all the data just like its supposed to.
=query('Inventory'!$A$1:$O, "select * ", 1 )
What I am trying to do is filter the spreadsheet with a where clause that is to use a cell dropdown list (generated by unique values in the original sheet). I have used this formula:
=query('Inventory'!$A$1:$O, "select * where B = "&C1&"", 1 )
where C1 has the drop down box. This always gives me the error:
"Error
Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: value" (the value depends on what is selected in the drop down).
It also doesn't work if I wrap the B = "&C1&" in parenthesis () which i have seen other posts use.
When I looked at Google's site for their example (https://support.google.com/docs/answer/3093343?hl=en), this should be a no-brainier unless something changed and their site isn't up to date.
I apologize for something this simple.
Try
=query('Inventory'!$A$1:$O, "select * where B = '"&C1&"'", 1 )
Related
I have a Google sheet document with 2 tabs: 1 for raw data and the other tab uses a Query function to search for entered criteria. The function is not pulling any rows after the 11/9/2022 date.
In other words, if I type "Beacon light is Inop", I get the 11/9/2002 row in the results. But if I type "radar alt inop", nothing shows up.
What I've tried: making sure all entries in column B are text.
Here is the URL's address for those who want to tweak or try their hand:
https://docs.google.com/spreadsheets/d/17HIljpouuSN9maog8iA2U6hC9pkIgcQ1Q3QZpqv9XSo/edit?pli=1#gid=168025446
Thoughts?
use:
=QUERY(RawData!A2:H, "SELECT A,B,C,D,E,F,G WHERE 1=1 "&
IF(C1="",, " and H = '"&C1&"'")&
IF(C2="",, " and A = '"&C2&"'"), 0)
correct output based on your dataset is one single row:
I am trying to use the Google Sheets QUERY function, and I have two sheets, and am trying to query a range in one sheet using a value from another sheet.
Here is the query:
=query(EntireLI, "Select * where D is not null and D CONTAINS "&C43&"", false)
I also tried LIKE instead of CONTAINS.
The error I am getting is:
Error: Unable to parse query string for Function QUERY parameter 2: NO_COLUMN:
Discord
When I change "&C43&" to 'Discord', then the function works, but I want it to grab this value dynamically, rather than hardcoding it.
I do not understand why it is using the value of the cell as the name of the column.
The broken query:
The sheet I am querying:
use:
=QUERY(EntireLI, "where D is not null and D contains '"&C43&"'", 0)
I have a google sheet (Final Calculation) where I am trying to get sum of all values in Column G (in Data tab) against a set of values in Column B, L and D (in Data tab). However, condition for values in Column D is dynamic and would likely change every month. I have created a tab Advertiser List where the condition for filter in Column D gets updated. How, do I use this condition in Query function used in C5 cell in Final Calculation tab?
I tried referencing the condition in Advertiser List sheet using indirect but I am getting an error. I have also added a hard coded formula is other cells in Final Calculation tab to show what am I trying to achieve.
Below is the formula that I have written and is showing an error:
=iferror(QUERY(Data!$A:$L, "Select Sum(G) where B = '"&$B5&"' and L = '"&C$3&"' and indirect('"Advertiser List"'&'"!"'&'"D2"') label sum(G)'' "),0)
Here is the link of the Google Sheet (Link)
You don't need INDIRECT to get a text value from another tab:
=QUERY(Data!$A:$L, "Select Sum(G) where B = '"&$B5&"' and L = '"&C$3&"' and (" & 'Advertiser List'!D1 & ") label sum(G)'' ")
When in doubt, try to build the "select ... " string in a separate cell until you see the expected result. Then wrap it with query and check again. Adding IFERROR should always be your last step, because you will want to see the errors that your query is throwing.
I am using this query in google sheets to search a table on one sheet and bring forth rows containing keywords based on 2 data validated drop down menus.
=QUERY('BDDB '!$A$2:$AA,"SELECT * WHERE 1=1 "&IF(E10="All Departments",""," AND LOWER(B) = LOWER('"&E10&"')")&IF(G10="Hiring Manager",""," AND LOWER(D) = LOWER('"&G10&"')"),1)
This filter works great and I was wondering if/how I could add a third search parameter because once I add this text
&IF(I10="Priority Level",""," AND = ('"&I10&"')")
before the last ,1), the formula is error free but the third data validated drop down will not act as a filter. The 'priority level' is a numeric value rather than words so I think I may just have a basic syntax issue or a larger one if I'm jumbling up too many IF statements.
if its numeric do not use single quotes. try:
=QUERY('BDDB '!$A$2:$AA,
"WHERE 1=1 "&
IF(E10="All Departments",," AND LOWER(B) = '"&LOWER(E10)&"'")&
IF(G10="Hiring Manager",," AND LOWER(D) = '"&LOWER(G10)&"'")&
IF(I10="Priority Level",," AND I = "&I10, 1)
I have a spreadsheet with 1 sheet of software version an another sheet of installation records. I want to do a conditional formatting that compares the version of in installation (on column F) to its know latest version number on another sheet ('Software Versions').
Current Solution
I came up with this formular initially:
=AND(F2<>"", F2=G2)
It works. But I need to maintain a column of QUERY results on G2:
=QUERY('Software Versions'!$A$1:$B$8, "Select B where A='" &D4& "' LIMIT 1")
Problem
Now I want to remove the G2 row altogether. I came up with this combined query:
=AND(F2<>"", F2=QUERY('Software Versions'!$A$1:$B$8, "Select B where A='" &D4& "' LIMIT 1"))
But I cannot save it because it is an "Invalid Formula":
Any way to actually do it?
Try use this formula:
=AND(F2<>"", F2=IFERROR(QUERY(INDIRECT("'Software Versions'!$A$1:$B$8"),
"Select B where A='" &D4& "' LIMIT 1 label B ''"),""))
I was able to make conditional formatting with this formula.
Improvements
Use indirect to address another sheet
Use label B '' to prevent header appear as query result
Use iferror(..., "") to be sure no error occurs when no data is found with query
I'm used to the good old VLOOKUP function for my conditional formattings.
The syntax is VLOOKUP(valueOrCell, sourceRange, index, FALSE)
So if the value from first parameter valueOrCell, exists in the sourceRange, return the value at index. FALSE is to have the exact match.
In my example I'm using only a single worksheet, but if you set the sourceRange to different worksheet it works as well.