Reputation: 225
On the "Import" sheet, we want to import "Main" but only the columns that have a checkbox checked on named range "checks" which happens to be range 1:1. Here is the formula I tried.
=INDEX(QUERY(TO_TEXT(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1jdpF-4b76XkZ8jASNwQmdK9hnd_XEpaVA9U6bPkUsyE/edit#gid=2083288698", "Main!1:999")), "where Row"&Row(checks)&" is true", 0))
I also want to skip rows that are completely blank. Only import rows that have a value on at least one of the columns.
Here is the link to the spreadsheet
Here is a screenshot.
Upvotes: 0
Views: 955
Reputation: 1
try:
=INDEX(QUERY(TRANSPOSE(QUERY(TRANSPOSE(TO_TEXT(IMPORTRANGE(
"1jdpF-4b76XkZ8jASNwQmdK9hnd_XEpaVA9U6bPkUsyE", "Main!1:999"))),
"where Col1 = 'TRUE'", )), "offset 1", ))
=INDEX(SUBSTITUTE(SPLIT(QUERY(TRIM(FLATTEN(QUERY(TRANSPOSE(
SUBSTITUTE(QUERY(TRANSPOSE(QUERY(TRANSPOSE(TO_TEXT(IMPORTRANGE(
"1jdpF-4b76XkZ8jASNwQmdK9hnd_XEpaVA9U6bPkUsyE", "Main!1:999"))),
"where Col1 = 'TRUE'", )), "offset 1", ), " ", CHAR(13))),,9^9))),
"where Col1 is not null", ), " "), CHAR(13), " "))
=INDEX(SUBSTITUTE(SPLIT(QUERY(TRIM(FLATTEN(QUERY(TRANSPOSE(
SUBSTITUTE(QUERY(TRANSPOSE(QUERY(TRANSPOSE(TO_TEXT(IF(IMPORTRANGE(
"1jdpF-4b76XkZ8jASNwQmdK9hnd_XEpaVA9U6bPkUsyE", "Main!1:999")="", "×", IMPORTRANGE(
"1jdpF-4b76XkZ8jASNwQmdK9hnd_XEpaVA9U6bPkUsyE", "Main!1:999")))),
"where Col1 = 'TRUE'", )), "offset 1", ), " ", CHAR(13))),,9^9))),
"where not Col1 contains '×'", ), " "), CHAR(13), " "))
Upvotes: 2