Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 如何在google spreadhseet中找到第二种模式_Google Sheets_Spreadsheet - Fatal编程技术网

Google sheets 如何在google spreadhseet中找到第二种模式

Google sheets 如何在google spreadhseet中找到第二种模式,google-sheets,spreadsheet,Google Sheets,Spreadsheet,我有一个数字列表,我使用=模式查找最常出现的数字,我的问题是如何查找同一列表中第二个最常出现的数字 在Google Sheets中,您可以使用该功能轻松检索此类信息(以及更多)。假设您的数据是A列中的数值,没有标题: =QUERY({A:A,A:A},“选择Col1,count(Col2),其中Col1不是空的groupby Col1 order by count(Col2)desc”,0) 将返回列a中的项目列表及其相关频率,按从高到低排序。注意:如果列A包含文本字符串,则需要使用where

我有一个数字列表,我使用=模式查找最常出现的数字,我的问题是如何查找同一列表中第二个最常出现的数字

在Google Sheets中,您可以使用该功能轻松检索此类信息(以及更多)。假设您的数据是A列中的数值,没有标题:

=QUERY({A:A,A:A},“选择Col1,count(Col2),其中Col1不是空的groupby Col1 order by count(Col2)desc”,0)

将返回列a中的项目列表及其相关频率,按从高到低排序。注意:如果列A包含文本字符串,则需要使用
where Col1!=''
而不是
,其中Col1不为null

现在,您可以使用索引检索所需的确切值;因此,要检索第二个最频繁的值,需要在第一列中使用第三个值(因为查询将填充输出中的标题行):

=INDEX(查询({A:A,A:A},“选择Col1,count(Col2),其中Col1不为空,按Col1分组,按count排序(Col2)desc)”,0),3,1)