如何根据相邻单元格计算文本字符串?

问题描述 投票:0回答:2

我在Google表格中有一个单元格网格:

A1在B1中显示产品代码“ABC”的数量,然后C1在D1中显示产品代码“DEF”的数量,然后在下一行的下一行重复,依此类推。 我试图使用某种COUNT公式在底部一次总结所有这个区域,但还没有弄清楚到底是怎么回事。

google-sheets google-sheets-formula
2个回答
0
投票
=QUERY({A:B;C:D}, 
 "select Col2, sum(Col1) 
  where Col1 is not null 
  group by Col2
  label sum(Col1)'Sumary', Col2'Item'")

0


0
投票
=QUERY({A:B;C:D}, 
 "select Col2, count(Col2) 
  where Col2 is not null 
  group by Col2
  label count(Col2)'Count', Col2'Item'")

0

© www.soinside.com 2019 - 2024. All rights reserved.