Google-sheets – formulas to transfer certain data from one sheet to another

google sheetsgoogle-sheets-query

I have a list of volunteers in sheet one. They have selected what programs they want to participate in with a yes or no in the column under that program. How can I create a formula that says if this cell says yes take that row of information to another spreadsheet. This was all the people that said yes for that project are on one sheet and easier to find?

Sample data:

        | Breakfast | Lunch | Dinner
--------+-----------+-------+--------
Steve   |    yes    |   no  |   yes
Jane    |    yes    |  yes  |   yes
Bob     |     no    |  yes  |   yes
Mary    |     no    |   no  |   yes

On sheet for "Breakfast":

        | Breakfast 
--------+-----------
Steve   |    yes    
Jane    |    yes    

On sheet for "Lunch":

        | Lunch
--------+--------
Jane    |  yes
Bob     |  yes

etc.

Best Answer

Breakfast

=QUERY(data!A2:D;"SELECT A WHERE B='yes'")

Lunch

=QUERY(data!A2:D;"SELECT A WHERE C='yes'")

Dinner

=QUERY(data!A2:D;"SELECT A WHERE D='yes'")

Assuming that the Sample data is in data!A:D