1

I have a Google Form, the answers go to Google Sheets.
I want to import answers from sheets (Аnswer) into new sheets but with a filter applied.
For example: from sheets (answer) into a new table, I import answers only from 100 REPPM. For this I use the following formula:
=QUERY(IMPORTRANGE ("https://docs.google.com/spreadsheets/d/1dMo6F1CTxAaEx1bS2NEu4kIu5hJTCBbCt13AV2E_f2w/edit#gid=1390527531","Answer 1!A:E"),"Select Col1,Col2,Col3,Col4,Col5 Where Col2 Matches '"&100 REPPM&"'")

My formula is incorrect, please help.

enter image description here

1

1 Answer 1

0

To copy those rows from one spreadsheet file to another, use this:

=query(importrange("1dMo6F1CTxAaEx1bS2NEu4kIu5hJTCBbCt13AV2E_f2w", "Answer 1!A1:E"), "where Col2 = '100 REPPM' ", 1)

To copy those rows from one tab to another within the same spreadsheet file, you should not use importrange(). Instead, use a regular range reference, like this:

=query('Answer 1'!A1:E, "where B = '100 REPPM' ", 1)

In the event your spreadsheet is in a locale that uses semicolons as formula argument separators, replace commas , in the above formulas with semicolons ;.

5
  • Thanks for trying! But it still doesn't work. syntax error in formula(. IMPORTRANGE is needed. Because I am transferring rows to another google sheets. Who has more thoughts? Commented Aug 18, 2021 at 6:42
  • The formulas in the answer are syntactically correct. Consider sharing a publicly editable sample spreadsheet with realistic-looking data. Commented Aug 18, 2021 at 6:55
  • The correct formula is=QUERY(IMPORTRANGE("1dMo6F1CTxAaEx1bS2NEu4kIu5hJTCBbCt13AV2E_f2w"; "Answer!A1:E15"); "select * where (Col2='100 REPPM')") Commented Aug 20, 2021 at 12:38
  • Right. If your spreadsheet is in a locale that uses semicolons as formula argument separators, you will need to use semicolons rather than commas. The select * clause and the parentheses in the where clause can be omitted. Edited the answer accordingly. Commented Aug 21, 2021 at 19:10
  • I gather that this is your first question at Stack Exchange. See What should I do when someone answers my question? Commented Aug 21, 2021 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.