Google sheets 从同一单元格中的多张图纸返回ArrayFormula
我有两张谷歌表格,上面有不同的惊奇漫画人物(A列)和相应的家庭世界(C列) 表1Google sheets 从同一单元格中的多张图纸返回ArrayFormula,google-sheets,spreadsheet,worksheet-function,array-formulas,Google Sheets,Spreadsheet,Worksheet Function,Array Formulas,我有两张谷歌表格,上面有不同的惊奇漫画人物(A列)和相应的家庭世界(C列) 表1 | Heroes | Count | Universe | |:------------------|--------------:|:------------------:| | Spider Ham | 365 | Earth-8311 | | Iron Man | 467
| Heroes | Count | Universe |
|:------------------|--------------:|:------------------:|
| Spider Ham | 365 | Earth-8311 |
| Iron Man | 467 | Earth-616 |
| Hulk Bunny | 24 | Earth-8311 |
第2张
| Heroes | Count | Universe |
|:------------------|--------------:|:------------------:|
| Spider Ham | 234 | Earth-8311 |
| Iron Man | 998 | Earth-616 |
| May Porker | 11 | Earth-8311 |
在Sheet3中,每行的公式=ArrayFormula(TEXTJOIN(“,”;1;REPT(Sheet1!A:A;1*(Sheet1!C:C=A$2))
(位于B列)从Sheet1中获取数据并按如下方式返回:
| Universe | Heroes |
|:-----------------|------------------------------------:|
| Earth-8311 | Spider Ham, Hulk Bunny |
| Earth-616 | Iron Man |
这很好。但我还希望将来自公式中Sheet2的数据组合在一起-因此Sheet3看起来像这样(没有重复项):
我想修改ArrayFormula以在Sheet1和Sheet2中搜索-这是否可以在单个电子表格公式中执行
已尝试=ArrayFormula(TEXTJOIN(“,”;1;REPT(Sheet1:Sheet2!A:A;1*(Sheet1Sheet2!C:C=A$2))
但它只返回#NAME?
请尝试:
=ArrayFormula(TEXTJOIN(“,”,1,UNIQUE(过滤器({Sheet1!A:A;Sheet2!A:A},{Sheet1!C:C;Sheet2!C:C}=A2)))
在谷歌表单和公式中使用。是为了消除重复项。请尝试:
=ArrayFormula(TEXTJOIN(“,”,1,UNIQUE(过滤器({Sheet1!A:A;Sheet2!A:A},{Sheet1!C:C;Sheet2!C:C}=A2)))
在谷歌表单和公式中使用。这是为了消除重复项。这是完美的:
=ArrayFormula(TEXTJOIN(“,”;1;UNIQUE(过滤器({Sheet1!A:A;Sheet2!A:A};{Sheet1!C:C;Sheet2!C:C}=A2))
-只需将,
更改为代码>因为我有一些区域设置-非常感谢!这是完美的:=ArrayFormula(TEXTJOIN(“,”;1;UNIQUE(过滤器({Sheet1!A:A;Sheet2!A:A};{Sheet1!C:C;Sheet2!C:C}=A2))
-只需将,
更改为代码>因为我有一些区域设置-非常感谢!
| Universe | Heroes |
|:-----------------|------------------------------------:|
| Earth-8311 | Spider Ham, Hulk Bunny, May Porker |
| Earth-616 | Iron Man |