Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9632

How to add multiple conditions onto a query

$
0
0

so this is completely experimental and not for a class. If anything, I'm doing this because I don't really have class right now. I am self-taught and very inexperienced when it comes to anything code related but I'm an ambitious person. I'm not sure what exactly is relevant, so this may be a bit of an info dump with a lot of extranneous info.

So I am trying to create a "matchmaking" form on Google forms. I have the data being put through to Google sheets, but in order to match people up, I want people with answers that are similar to be paired up.

I have four different questions with multiple possible responses each. I will be referring to the questions by the column they end up on on the 'Form Responses 1' page of the sheet.

Column D has 3 options
Column E has 4 options
Column F has 4 options
Column G has 2 options

I just need help with making the query for the first page and then I think I can figure out the rest.

So for the first page, I wanted only the responses that answered "Yes" for Column D, "Red" for Column E, "Dog" for Column F, and "Seven" for Column G. They had to have responded with these exact answers.

I have been toying around with this format but for some reason, it will only let me use "and" once:

=query('Form Responses 1’!A:I,”Select * Where D=’Yes’ and E='Red' and F='Dog' and G='Seven'”)

Any help is great. Assume I don't know anything about any commands because I don't and I would like to learn and understand it.


Viewing all articles
Browse latest Browse all 9632

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>