Google sheets 特定数据的总数
我有两张表,其中sheet1是员工拥有的项目,我想通过添加特定员工拥有的所有项目在表2中组织它 有人能帮我吗 例如。在表1中,Employee mark有多个项目,在表2中,我想合计Employeemark拥有的所有项目 表1Google sheets 特定数据的总数,google-sheets,pivot,google-sheets-formula,array-formulas,google-sheets-query,Google Sheets,Pivot,Google Sheets Formula,Array Formulas,Google Sheets Query,我有两张表,其中sheet1是员工拥有的项目,我想通过添加特定员工拥有的所有项目在表2中组织它 有人能帮我吗 例如。在表1中,Employee mark有多个项目,在表2中,我想合计Employeemark拥有的所有项目 表1 *---*----*---*----*----* | | ITEMS | Employee| *---*--------*----*----* | 1 | BOOK | MARK | | 2 | PEN | MARK | | 3 | tape
*---*----*---*----*----*
| | ITEMS | Employee|
*---*--------*----*----*
| 1 | BOOK | MARK |
| 2 | PEN | MARK |
| 3 | tape | MARK |
| 4 | BOOK | MARK |
| 5 | PEN | GIL |
| 6 | TAPE | GIL |
| 7 | BAG | JANE |
| 8 | PEN | JANE |
*---*----*--------*----*
第2页
*---*----*---*-----*------*------*------*
| |Employee| PEN | BOOK | TAPE | BAG |
*---*--------*-----*------*------*------*
| 1 | Mark | 1 | 2 | 1 | |
| 2 | GIL | 1 | | 1 | |
| 3 | JANE | 1 | | | 1 |
*---*--------*-----*------*------*------*
这是我使用的公式,但没有结果
=iferror(QUERY('sheet1'!a1:b,"select a, count(b) where b = 'pencil|tape' group by a"),{"♥","♥","♥"})
Sir@player0,我添加一个包含数量的列,而不是合计员工拥有的所有项目,它将合计员工拥有的项目数量。
=ARRAYFORMULA(QUERY(UPPER(B1:C),
"select Col2,count(Col2)
where Col2 is not null
group by Col2
pivot Col1", 1))