dimanche 15 décembre 2019

Dynamically query or filter a table in Google Sheets using checkboxes and searchbox

I have a database of songs and want to use filter or query to return results based on a dashboard with search-boxes and check-boxes. This seems rudimentary, but I can't find what I'm looking for after a few days. Query seems super powerful, but largely when hard coding. I need a user-friendly interface! I've seen some tutorials on incorporating drop-down boxes, but I don't necessarily want to use those.

I couldn't figure out how to add IF() statements to the WHERE clause in query.

=QUERY(A4:G9, "WHERE IF '"(C2=TRUE, "' '"C CONTAINS TRUE"'",1))

This is what I'm starting with, and I know its all kinds of wrong.

GOAL: When the checkbox for MP3 is ticked, all songs with MP3s are listed. But when I also tick the WAV box, only songs with MP3s and WAVs remain, etc.

enter image description here

I will keep the source data and the search key on different tabs. Eventually like to add ranges to the length and bpm boxes too.

Any suggestions on the methods or formulas would be much appreciated.




Aucun commentaire:

Enregistrer un commentaire