I am trying to construct quite a complex formula but for now, without success, I will appreciate any help!
First some context I am trying to synchronize the sheets that stores answer from google forms with other sheets to make a summary so I have for example 3 sheets synchronized with 3 different forms all have a column named student code (it is not named range just a value in the first row). then I have created by another formula comma-separated list of the spreadsheet relevant for the user (for example I know that student 1 is in exercise a b c
so I get links of all of the spreadsheets into the appropriate cell as a comma-separated String) so what I want to achieve
=Arrayformula(Filter(IMPORTRANGE(SPLIT(AB2, ",", TRUE, TRUE),"'Form responses 1'!A1:Z1000")))
but without success
I would really appreciate the help (oh and I rather look for achieving it through google sheets formula not by app script function - because import range is so much more efficient than using sheet service in-app script)
I created test cases in order to help with the resolution of the problem a summary spreadsheet where I want to accumulate data:
https://docs.google.com/spreadsheets/d/1cJn8CX25t98GI9E4aYgsQPNt28w_sX0ynfhwkG3ZKyA/edit?usp=sharing
spreadsheets that mimics data imported from forms:
https://docs.google.com/spreadsheets/d/1BgYN7f6ojk7NhOlj2FuSm0goMt_HjqkebWiOJYQmN0E/edit?usp=sharing
https://docs.google.com/spreadsheets/d/19cDQR-tN5_S_rblc-hbavxVF0xforoMaKUQYjuYBN-E/edit?usp=sharing
https://docs.google.com/spreadsheets/d/1QPMcHIH5PXQwWbAULk7vxJ4g-pSXK1qHKhFvLwdRaAU/edit?usp=sharing
try:
={""; ARRAYFORMULA("=QUERY({"&TEXTJOIN(";", 1, "IMPORTRANGE("""&
TRANSPOSE(SPLIT(B2, ","))&""", ""'Sheet1'!A1:Z1000"")")&
"}, ""where Col1 is not null"", 0)")}
then copy generated formula and paste it where you need:
={""; ARRAYFORMULA("=FILTER(QUERY({"&TEXTJOIN(";", 1, "IMPORTRANGE("""&
TRANSPOSE(SPLIT(B2, ","))&""", ""'Sheet1'!A1:Z1000"")")&
"}, ""where Col1 is not null"", 0), REGEXMATCH(TRANSPOSE(QUERY(TRANSPOSE(QUERY({"&
TEXTJOIN(";", 1, "IMPORTRANGE("""&
TRANSPOSE(SPLIT(B2, ","))&""", ""'Sheet1'!A1:Z1000"")")&
"}, ""where Col1 is not null"", 0)),,99^99)), A2))")}