Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 电子表格基于与动态列的匹配连接多个单元格_Google Sheets_Concatenation - Fatal编程技术网

Google sheets 电子表格基于与动态列的匹配连接多个单元格

Google sheets 电子表格基于与动态列的匹配连接多个单元格,google-sheets,concatenation,Google Sheets,Concatenation,我试图根据表1中的数据,在表2的B:B中以逗号分隔的字符串将套件中的所有序列号连接起来 除了串联语句中的一组if语句之外,这是否可能呢?我一直在运行我的大脑,试图通过vlookup、index/match找出一种方法来实现这一点,可能需要一个Google Sheets附加组件,因为我在Excel中的搜索显示了一些可能有效的VBA选项 Get the column that has the kit selections, need to create the action off of this

我试图根据表1中的数据,在表2的B:B中以逗号分隔的字符串将套件中的所有序列号连接起来

除了串联语句中的一组if语句之外,这是否可能呢?我一直在运行我的大脑,试图通过vlookup、index/match找出一种方法来实现这一点,可能需要一个Google Sheets附加组件,因为我在Excel中的搜索显示了一些可能有效的VBA选项

Get the column that has the kit selections, need to create the action off of this match.
=MATCH(TO_TEXT($A2),Sheet-1!$A$1:$G$1,0)
活页1在A2:a中有一个序列号列表,单元格B1:G1包含不同的套件号,在每个单元格B2:G100中,如果套件包含项目,它将有一个“1”,否则单元格为空

S/N        Kit1        Kit2        ...        Kit7
GF367       1           1
BW274       1                                  1
...
BSP23                   1
表2的A2:a中有一个套件编号,该编号与表1中的一个套件相关!:B1:G1

Kit#        S/N Comma String
Kit1        GF367,BW274
Kit2        GF367,BSP23
...
Kit7        BW274
试试第二张!B2

=mid(arrayformula(concatenate(if(index(Sheet1!$B$2:$H$4,,match(A2,Sheet1!$B$1:$H$1,0))<>"",", "&Sheet1!$A$2:$A$4,""))),3,999)
=ArrayFormula(transpose(substitute(trim(
 QUERY(IF(Sheet5!B2:E,Sheet5!A2:A,),"select *",ROWS(A:A)))," ",",")))
=mid(数组公式(串联)(如果(索引(Sheet1!$B$2:$H$4,匹配(A2,Sheet1!$B$1:$H$1,0))“”,“,”和Sheet1!$A$2:$A$4,”),3999)

在Sheet2中尝试!B2

=mid(arrayformula(concatenate(if(index(Sheet1!$B$2:$H$4,,match(A2,Sheet1!$B$1:$H$1,0))<>"",", "&Sheet1!$A$2:$A$4,""))),3,999)
=ArrayFormula(transpose(substitute(trim(
 QUERY(IF(Sheet5!B2:E,Sheet5!A2:A,),"select *",ROWS(A:A)))," ",",")))
=mid(数组公式(串联)(如果(索引(Sheet1!$B$2:$H$4,匹配(A2,Sheet1!$B$1:$H$1,0))“”,“,”和Sheet1!$A$2:$A$4,”),3999)

假设Sheet2的A列是源数据第一行的转置,请在Sheet2中尝试此操作!B2

=mid(arrayformula(concatenate(if(index(Sheet1!$B$2:$H$4,,match(A2,Sheet1!$B$1:$H$1,0))<>"",", "&Sheet1!$A$2:$A$4,""))),3,999)
=ArrayFormula(transpose(substitute(trim(
 QUERY(IF(Sheet5!B2:E,Sheet5!A2:A,),"select *",ROWS(A:A)))," ",",")))
解释

如果用于将源交叉选项卡数据上的1替换为行标签,则使用QUERY连接该值


查询通过空格字符将行和值连接起来。上面的公式使用此功能连接上一步生成的数据值,然后使用TRIM删除多余的空格,并用逗号替换剩余的空格

假设Sheet2的A列中是源数据第一行的转置,请在Sheet2中尝试此操作!B2

=mid(arrayformula(concatenate(if(index(Sheet1!$B$2:$H$4,,match(A2,Sheet1!$B$1:$H$1,0))<>"",", "&Sheet1!$A$2:$A$4,""))),3,999)
=ArrayFormula(transpose(substitute(trim(
 QUERY(IF(Sheet5!B2:E,Sheet5!A2:A,),"select *",ROWS(A:A)))," ",",")))
解释

如果用于将源交叉选项卡数据上的1替换为行标签,则使用QUERY连接该值

查询通过空格字符将行和值连接起来。上面的公式使用此功能连接上一步生成的数据值,然后使用TRIM删除多余的空格,并用逗号替换剩余的空格

是的,这是可能的。是的,这是可能的。