A
A
Andrey2020-01-26 15:52:21
Google Sheets
Andrey, 2020-01-26 15:52:21

Is it possible to transfer data from several sheets to one in the QUERY function?

There is data on 5 sheets, I made a formula, under the conditions of which certain columns are transferred to the final sheet, it looks like this:

=QUERY('Неделя 1(закрыта)'!A2:J1003; "select B, F where(J='Заявка закрыта')")

It works and transfers data from only one week to the final sheet, but I need to transfer data from other sheets as well, the option to make a separate formula for other sheets is not suitable.
Can I somehow specify in the range, in addition to 1 week, 2 weeks? Or how can I make it better to migrate selected data from multiple sheets when certain conditions are met?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2020-01-27
@oshliaer

Use range concatenation and Col notation

=QUERY(
  {'Неделя 1(закрыта)'!A2:J1003;'Неделя 2(закрыта)'!A2:J1003;'Неделя 3(закрыта)'!A2:J1003};
  "select Col2, Col6 where(Col10='Заявка закрыта')";
  0
)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question