列中当前值的计数

问题描述 投票:1回答:1

我想知道列中当前值的计数。

+--------------+---------------------+--+------------+------------+
|              |                     |  | 1st column | 2nd column |
+--------------+---------------------+--+------------+------------+
| How many 'A' | (there should be 1) |  | A          | B          |
+--------------+---------------------+--+------------+------------+
| How many 'B' | (there should be 2) |  | B          | B          |
+--------------+---------------------+--+------------+------------+
|              |                     |  | B          | A          |
+--------------+---------------------+--+------------+------------+

我尝试在Google表格中执行此操作。

arrays google-sheets google-sheets-formula counting google-sheets-query
1个回答
1
投票

尝试:

=QUERY({D2:D; E2:E}, 
 "select Col1,count(Col1) 
  where Col1 is not null 
  group by Col1 
  label count(Col1)''", 0)
© www.soinside.com 2019 - 2024. All rights reserved.