the fangirl life
the fangirl life

Reputation: 13

Trying to query select cells based on data in another cell

Not really sure what’s wrong with my function but I’ve tried so many different variations to make it work and I keep getting an #ERROR! with a “formula parse error” pop-up

What I’m trying to do is populate a sheet from data in another sheet. I only want specific cells in Column C from the other sheet to populate based on the text contained in Column D cells (on the ‘other’ sheet)

So the fxn i have going now is: =QUERY({‘[insert other sheet name]’!C3:D}; “select C where D=“‘[insert desired text]’;0)

I’ve tried the fxn without the ‘C where D ...’ part and it worked fine populating all of the data without selecting any specific cells so I’m sure that’s where the problem is. I’ve also tried ”select C where D contains ‘[insert desired text]’” or ”select C where D = ‘[insert desired text]’” and a number of other variations with no luck ... anyone have any ideas?

Upvotes: 1

Views: 540

Answers (1)

Marios
Marios

Reputation: 27350

Don't use these , or .

Instead do use these " or '.

Try this:

=QUERY('insert other sheet name'!C3:D; "select C where D contains 'insert desired text' ";0)

or this:

=QUERY('insert other sheet name'!C3:D; "select C where D = 'insert desired text' ";0)

Upvotes: 1

Related Questions