【问题标题】:Calculate largest single day sum given a range of rows in Google Sheets给定Google表格中的一系列行,计算最大的单日总和
【发布时间】:2019-10-06 22:53:35
【问题描述】:

我正在尝试提出一个 Google 表格公式来计算一个日期范围内的最大单日总和和最小单日总和。例如:

给定下面的表格,我有一个日期范围 A3:A12 和一个利润范围 B3:B12。我想使用一个公式来检查日期和利润的范围,然后返回最大单日总和和最小单日总和的日期和总和。有没有办法做到这一点?谢谢。

【问题讨论】:

    标签: arrays google-sheets sum google-sheets-formula google-sheets-query


    【解决方案1】:

    删除 E:F 范围内的所有内容并在 E2 单元格中使用此公式:

    ={QUERY(A3:B, 
      "select sum(B),A 
       where B is not null 
       group by A 
       order by sum(B) desc 
       limit 1 
       label sum(B)''", 0);
      QUERY(A3:B, 
      "select sum(B),A 
       where B is not null 
       group by A 
       order by sum(B) asc 
       limit 1 
       label sum(B)''", 0)}
    

    【讨论】:

    • 这完全符合我的期望。谢谢你。我以前没有在excel中使用过查询。非常有用。
    猜你喜欢
    • 1970-01-01
    • 2021-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多