EN VI

Google-sheets - Apply IMPORTRANGE to filtered array?

2024-03-17 21:30:06
How to Google-sheets - Apply IMPORTRANGE to filtered array

I have a series of Sheet IDs that I want to import data from. The list is dynamic. I want to pull columns A:C from each sheet in that array.

I have tried using arrayformula and a map-lambda formula. Arrayformula pulls data from the first sheet, and map-lambda returns "Result should be a single row." error.

I have sheet1 with column A:A that holds the sheet IDs. On a different tab, I want to pull data from each sheet ID, tab sheet1, columns A:C.

Each array is variable - the number of entries in the sheet IDs can increase/decrease and the number of rows in A:C can vary (the number of columns is always the same).

I would love any input on this. Thanks !

Solution:

Assuming:

Sheet 1Column_A has the Sheet_IDs

you wish to import from tab Sheet 1A:C columns from all target Sheet_IDs

=reduce(tocol(,1),tocol(Sheet1!A:A,1),lambda(a,c,vstack(a,let(Σ,importrange(c,"Sheet1!A:C"),filter(Σ,byrow(Σ,lambda(Λ,counta(Λ)>0)))))))
Answer

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login