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电子表格中的列生成所有可能的组合_Google Sheets - Fatal编程技术网

Google sheets 为Google电子表格中的列生成所有可能的组合

Google sheets 为Google电子表格中的列生成所有可能的组合,google-sheets,Google Sheets,我有一个谷歌电子表格文档,有三列a、B和C 我需要用A列和B列中所有可能的值组合填充C列。请查看捕获的A,以了解我的意思 我发现这可以在Excel中完成,但在google电子表格中不起作用 该公式应适用于更多列(例如:四列而不是两列) 我能做这个吗 更新201810 原始公式对于大数据集崩溃。我描述了一种使用任意大小的数据进行交叉连接的方法 试一试公式: =ArrayFormula(转置(拆分)(报告(串联(A2:A和字符(9)),计数A(B2:B)),字符(9))) &“”&转置(拆分(连接

我有一个谷歌电子表格文档,有三列a、B和C

我需要用A列和B列中所有可能的值组合填充C列。请查看捕获的A,以了解我的意思

我发现这可以在Excel中完成,但在google电子表格中不起作用

该公式应适用于更多列(例如:四列而不是两列)

我能做这个吗


更新201810

原始公式对于大数据集崩溃。我描述了一种使用任意大小的数据进行交叉连接的方法


试一试公式:
=ArrayFormula(转置(拆分)(报告(串联(A2:A和字符(9)),计数A(B2:B)),字符(9)))
&“”&转置(拆分(连接)(报告(B2:B&char(9)、计数(A2:A)))、字符(9)))

结果是:

car red
train red
car yellow
train yellow
car blue
train blue
您可以再次使用它添加另一个列表:

公式位于单元格
C2
E2

C2
是:

=ArrayFormula(transpose(split(rept(concatenate(A2:A&char(9)),counta(B2:B)),char(9)))&" "&transpose(split(concatenate(rept(B2:B&char(9),counta(A2:A))),char(9))) )
=ArrayFormula(transpose(split(rept(concatenate(C2:C&char(9)),counta(D2:D)),char(9)))&" "&transpose(split(concatenate(rept(D2:D&char(9),counta(C2:C))),char(9))) )
而E2是:

=ArrayFormula(transpose(split(rept(concatenate(A2:A&char(9)),counta(B2:B)),char(9)))&" "&transpose(split(concatenate(rept(B2:B&char(9),counta(A2:A))),char(9))) )
=ArrayFormula(transpose(split(rept(concatenate(C2:C&char(9)),counta(D2:D)),char(9)))&" "&transpose(split(concatenate(rept(D2:D&char(9),counta(C2:C))),char(9))) )

我应该在单个单元格中插入此公式吗?”=ArrayFormula(转置(拆分)(报告(连接)(A2:A和字符(9)),计数(B2:B)),字符(9))&“&转置(拆分)(拆分)(报告(B2:B和字符(9),计数(A2:A))),字符(9)))”这是我所做的,但我收到了一条错误消息。你为什么把公式分成两部分?很抱歉,我找不到:这里是电子表格(你可以编辑),你能把你的公式粘贴到那里吗:你必须用分号替换逗号
在公式中。这是区域设置。我把文件设置区域改成了我们的,效果很好。