搜索文本组合,然后将其下 2 个单元格移动到另一个 table

Search for a text combination and then moving its next 2 cells to the other table

好吧,我有 3 个 table,从第一个开始,取 2 个单元格的值并放入第三个 table 中,从第三个 table 中求和这些细胞被添加到一个细胞中并在另一个细胞中计数。例如:第一个 table Jacob 1 Apple(在不同的两行中写了 2 次)。这将进入第 3 个 table,然后数字将被计算(2 个数字)并写入第 2 个第一个单元格,然后添加并写入另一个单元格。我想重做很多次,因为我添加了一个新名称或数字,它有点破坏了公式,并且公式开始从上面的单元格或下面的单元格中窃取。

Link: https://docs.google.com/spreadsheets/d/1a0NIeA2xlDzpK-C4Mvq1UANfYdUHc9gHli6U3v2L6r8/edit?usp=sharing

删除 E:K
范围内的所有内容 将此公式粘贴到 E1 单元格:

=ARRAYFORMULA({QUERY(A1:C, 
 "select A,count(A),sum(B) 
  where A is not null 
  group by A 
  label count(A)'DS events total',sum(B)'Overall attendees'", 0),
 QUERY(IFERROR(QUERY(A1:C, 
 "select sum(B) 
  where A is not null 
  group by A 
  pivot C", 0)*1, 
 {"Overal BTs", "Overal CTs", "Overal FTs", "Overal PTs"}), 
 "select Col4,Col1,Col3,Col2", 1)})