Google-sheets – How to make the query look to the next choice

google sheetsgoogle-sheets-query

I am importing data from a Google Form to a Google Spreadsheet.

I have created a query to compile data from the response tab to 4 different tabs in the spreadsheet.

I have put a limit on the number of results that can be placed on each tab.

The respondent gets 4 choices (red, blue, yellow, green). If red has reached the limit that can be added to that tab, how do I make the query look to the next choice, blue and so on?

Here is my query so far:

=query('Form Responses 1'!A:E,"Select * Where D='Blue' Limit 10", 1)

Best Answer

Use offset

The offset clause is used to skip a given number of first rows. If a limit clause is used, offset is applied first: for example, limit 15 offset 30 returns rows 31 through 45.