I
I
ivandaf2015-04-22 11:11:36
Google Sheets
ivandaf, 2015-04-22 11:11:36

How to merge ranges in Google Spreadsheets?

Tables are formed in different tabs of one file, then I want to combine them (while ignoring empty lines) into one pivot table.
To insert a single range I use QUERY:

=QUERY('Фундамент'!A2:I41; "SELECT * WHERE D!='' OR H!=''"; TRUE)

How to collect multiple ranges from different sheets (tabs)?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
ivandaf, 2015-04-22
@ivandaf

Looks like I found a way:

=ARRAYFORMULA({QUERY('Лист1'!A2:I41; "SELECT * WHERE D!='' OR H!=''"; TRUE);QUERY('Лист2'!A2:I41; "SELECT * WHERE D!='' OR H!=''"; TRUE);QUERY('Лист3'!A2:I41; "SELECT * WHERE D!='' OR H!=''"; TRUE)}
)

N
Nnick17, 2016-11-13
@Nnick17

Hey!
did you find any other ways? because in this method only 1 range is copied, the second one is not pulled up.

A
AntLer, 2017-01-28
@AntLer

You can combine ranges with {}
QUERY({'Sheet1'!A2:I41;'Sheet2'!A2:I41;'Sheet3'!A2:I41}; "SELECT * WHERE D!='' OR H!='' "; TRUE)

S
Stanislav Maslakov, 2018-12-10
@STM_Solution

Using the filter function, I think it will help. We need to find all non-empty lines in the ranges, so we filter them, and put the ranges into arrays and that 's it
. Here is an example of import code from three different sheets of the table.
=filter({'Client1'!A2:K;'Client3'!A2:K;'Client2'!A2:K};NOT(ISBLANK({'Client1'!A2:A;'Client3'!A2:A; 'Client2'!A2:A})))
P.S. We are looking for empty cells only in the first column.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question