Search code examples
joingoogle-sheetsgoogle-sheets-formulaarray-formulasgoogle-sheets-query

Query to select a large range of columns without manually entering each column Google Sheets


I am using the solution presented in this post:

https://webapps.stackexchange.com/questions/101926/google-sheets-query-to-select-a-large-range-of-columns-without-manually-entering

But now I need to query data from a different spreadsheet. I know the importrange requires the use of 'Col' to specify the column. However, I don't know how to change this string:

=arrayformula(join(",", substitute(address(1, column(C:F), 4), "1", "")))

Solution

  • you can use:

    =ARRAYFORMULA(JOIN(",", "Col"&COLUMN(C:F)))
    

    0