简体   繁体   English

使用 importrange 加入几列

[英]join few columns with importrange

I wish to join few columns in a importrange,我希望加入一个导入范围中的几个专栏,

i am using this formula here =importrange("URL", "A1:J3") "i would like to join A, D, H here" ;我在这里使用这个公式=importrange("URL", "A1:J3") "我想在这里加入 A、D、H" importrange("URL", "L1:Z3") "and to join M, P here" importrange("URL", "L1:Z3") "并在这里加入 M, P"

Do you want to concatenate row by row those columns of the imported ranges?你想逐行连接导入范围的那些列吗?

Something like this??像这样的东西?? Used INDEX to refer to the columns in each row.使用 INDEX 来引用每一行中的列。 If needed you can change CONCATENATE with JOIN or TEXTJOIN to add some separator:如果需要,您可以使用 JOIN 或 TEXTJOIN 更改 CONCATENATE 以添加一些分隔符:

=BYROW(IMPORTRANGE(URL,"A1:J3"),LAMBDA(each, CONCATENATE(INDEX(each,,1),INDEX(each,,4),INDEX(each,,8))))

In Google Sheets, you can use the QUERY function to join specific columns from multiple IMPORTRANGE functions as I previously described.在 Google 表格中,您可以使用 QUERY function 连接来自多个 IMPORTRANGE 函数的特定列,如我之前所述。

I have added the code of joining A, D, H from the first IMPORTRANGE function, and columns M, P from the second IMPORTRANGE function:我添加了从第一个 IMPORTRANGE function 加入 A、D、H 的代码,以及从第二个 IMPORTRANGE function 加入 M、P 列的代码:

=QUERY({IMPORTRANGE("URL", "A1:J3"), IMPORTRANGE("URL", "L1:Z3")}, "SELECT Col1, Col4, Col8, Col13, Col16")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM