Stephen Irvine
Stephen Irvine

Reputation: 31

Merge and filter data from multiple google sheets tabs

I have 3 google sheets tabs, all with the same columns and would like to add a 4th tab that displays all of the data from the other 3 tabs where column K = "Q116".

Importing all of the data from the 3 sheets is easily achieved: =query({'Sheet 1'!A3:Q50;'Sheet 2'!A3:Q50;'Sheet 3'!A3:Q50})

However, I can't work out how to add a filter/where clause to only return results where column K (in all sheets) = 'Q116'.

Any ideas?

Thanks!

Upvotes: 0

Views: 14141

Answers (1)

Chris Hick
Chris Hick

Reputation: 3094

When using QUERY on a vertical array, you need to use the column numbers in the where clause. Try this formula:

=query({'Sheet 1'!A3:Q50;'Sheet 2'!A3:Q50;'Sheet 3'!A3:Q50},"where Col11 = '"&Q116&"'")

Upvotes: 2

Related Questions