I have a number of sheets in my Google Sheets Doc. I would like to stack some rows from most of the sheets in another sheet.
Here is the code I am using:
=VSTACK(
MAP(
{"A"; "B"; "C"; "D"; "E"},
LAMBDA(
sheetname,
FILTER(
INDIRECT(
"'"&sheetname&"'!A1:A10"),
INDIRECT(
"'"&sheetname&"'!A1:A10")<>2)
)
)
)
This code, however, returns "Result should be a single row." error. Each lambda maps the name of the sheet to the range of rows. The question now is, how can I stack all of those ranges into one big table?
It's easy to stack a predefined number of ranges (example) but how could one stack the variable number of ranges that are returned from the MAP
function? The length of my array is static in the example for simplicity but in reality it's variable and the array is returned by a function.