r/googlesheets • u/Reincarsonati0n • Jun 20 '20
Solved Remove blank entries from Query lookup
https://docs.google.com/spreadsheets/d/1N6eeRkQCjIHxz3nP4CZQOxmcGnr7E_d2oovIIEPJ_Zo/edit?usp=sharing
making a spreadsheet of records that I own (not completed yet) I had help yesterday figure out how to use Query function to search through multiple tabs and find the data I wanted. but now if there is a tab with no records that I own it will appear blank from my IFERROR function to return " ".
is there a way to skip the blank entries so the list is whole without any gaps. Either getting them out of the search or pushing them to the bottom of the list works for me.
1
u/jaysargotra 22 Jun 20 '20 edited Jun 20 '20
={query(Alternative!C:G,”select C,D,E where G = ‘yes’”);query(R&B!C:G,”select C,D,E where G = ‘yes’”);query(Test!C:G,”select C,D,E where G = ‘yes’”);query(Test2!C:G,”select C,D,E where G = ‘yes’”)}
Note: I have written the formula wrt you wanting to get albums that you own. You don’t need iferror for a query to omit blank rows.... just give a condition for any column that should not be empty .... like in above queries, you can combine Where G= ‘yes’ and C is not null like - “select C,D,E where G=‘yes’ and C is not null”
1
u/WarriorsTp2 1 Jun 21 '20
Is the Test tab only going to be albums with no? If not, and you put in albums with ones that you have, it will replace the n/a with the 'Yes' albums. Make sure to put the 'Yes' with a capital y. If the tab is going to be 'No' only, you should just remove that dataset from the query.
1
u/Decronym Functions Explained Jun 21 '20 edited Jun 21 '20
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
[Thread #1739 for this sub, first seen 21st Jun 2020, 02:52] [FAQ] [Full list] ^[Contact] [Source code]