-1

I have a Sheet1 that I want to use as my dataset for a Google Spreadsheet query that looks as follows:

Sheet1

The query is in Sheet 2 and I want to pull across a list of manufacturers who have a Type that matches the value in Sheet2:A1. The query I currently have isn't working but I can't see what I'm doing wrong.

enter image description here

The value in Sheet2!A1 was copy and pasted from Sheet1!C4 so should be identical.

Spreadsheet can be found at https://docs.google.com/spreadsheets/d/1RP5U16TMbTdZngjrJhGfJxzeLNLapOl9zScQtb2PFLE/edit?usp=sharing

Can anyone advise?

  • Thank you. Now, using =QUERY(Sheet1!A2:C4, "SELECT A WHERE C='&A1&'", 1) it returns Ford. It should return Mercedes which is the only row with Compact in column C ? – Nick Weavers Jun 18 '18 at 13:08
  • @NickWeavers Please update your question to show your progress and current state of the problem to be solved. – Rubén Jun 18 '18 at 13:22
  • Thanks @l'-'l. I see that if the data-set rows start below the header you need 0 not 1 as third QUERY param, but when I change it to 0 I get a "Query completed with empty output" result. I copy and pasted Sheet2!A1 to Sheet1!C4 so they should be identical. – Nick Weavers Jun 18 '18 at 15:28
  • Question updated to show progress @Rubén - thanks for pointing that out. – Nick Weavers Jun 18 '18 at 15:30
  • @NickWeavers The spreadsheet requires to ask permission. Please share it with anyone with the link to view. – Rubén Jun 18 '18 at 15:38
1

The correct syntax:

=QUERY(Sheet1!A2:C4, "SELECT A WHERE C='"&A1&"'",0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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