【发布时间】:2021-07-29 11:54:27
【问题描述】:
表 1
| Initial Score | Actions | OC | Criticality | DT | Post Score | Current Score | Responsible | Completed | Due Date |
|---|---|---|---|---|---|---|---|---|---|
| 252 | Expand to list actions | 105 | 140 | ||||||
| text | 6 | 42 | 6 | 252 | Jane | 100% | 10/25/20 | ||
| text | 5 | 35 | 4 | 140 | John | 100% | 10/30/20 | ||
| text | 5 | 35 | 3 | 105 | Sam | 01/25/21 | |||
| 324 | Expand to list actions | 135 | 216 | ||||||
| text | 6 | 54 | 4 | 216 | Cindy | 10/15/20 | |||
| text | 5 | 45 | 3 | 135 | Roger | 12/10/20 | |||
| 288 | Expand to list actions | 32 | 192 | ||||||
| text | 4 | 32 | 6 | 192 | Bill | 11/21/20 | |||
| text | 2 | 16 | 6 | 96 | Karen | 100% | 01/07/21 | ||
| text | 2 | 16 | 2 | 32 | Cindy | 02/28/21 |
注意事项:
在“分数后”列中,粗体单元格(105、135、32)是使用 MIN 函数获得的,范围为正下方的单元格。
我需要什么:
我不想对“截止日期”列为空白的“后分数”列中的单元格求和。
仅当“到期日期”早于或等于相应的“日期”(来自表 2)时,我才想对“后分数”列中的单元格求和。但是,如果“后分数”列中有两个或更多单元格符合此条件,那么我只想对每个组的 MIN 值求和(按组,我是指“展开以列出操作”下的每组操作。
我尝试了以下方法:
=SUMIFS(Sum_range,Criteria_range1,Criteria1,Criteria_range2, criteria2)
=SUMIFS([Post Score]2:[Post Score]11,[Due Date]2:[Due Date]11,"")
这将返回“后分数”列中单元格的总和,其中“到期日期”单元格早于或等于相应的“日期”单元格,并且“到期日期”单元格不为空。
但是,我希望它只对 Sum_range 中的 MIN 值求和,这两个条件都满足。
目标:
表 2
| Date | What the score should be | Values that should be added from column "Post Score" | Logic |
|---|---|---|---|
| Initial Score | 864 | 252+324+288 | SUM of "Initial Score" Column |
| 10/31/20 | 644 | 140+216+288 | SUM only if "Due Date" in table 1 is before or equal to "Date" in table 2. If there are 2 or more values that meet this condition only SUM the MIN value |
| 11/30/20 | 548 | 140+216+192 | SUM only if "Due Date" in table 1 is before or equal to "Date" in table 2. If there are 2 or more values that meet this condition only SUM the MIN value |
| 12/31/20 | 467 | 140+135+192 | SUM only if "Due Date" in table 1 is before or equal to "Date" in table 2. If there are 2 or more values that meet this condition only SUM the MIN value |
| 1/31/20 | 336 | 105+135+96 | SUM only if "Due Date" in table 1 is before or equal to "Date" in table 2. If there are 2 or more values that meet this condition only SUM the MIN value |
| 2/28/2021 | 272 | 105+135+32 | SUM only if "Due Date" in table 1 is before or equal to "Date" in table 2. If there are 2 or more values that meet this condition only SUM the MIN value |
| Final Score | 272 | 105+135+32 | SUM cells of column "Post Score" where "Due Date" is Blank |
【问题讨论】:
-
我正在看这个,看看我是否理解它。在表 2 中,对于 2020 年 10 月 31 日,您有 140+216+288。这是因为最后一组中没有没有个日期在 2020 年 10 月 31 日之前,所以你取的是初始分数 (288)?
-
是的。对于第一组,我取 140,因为这是 2020 年 10 月 31 日之前的两个分数中的最低分数。对于第二组,我取 216,因为这是 20 年 10 月 31 日之前的唯一分数。对于最后一组,我保持初始分数,因为没有分数符合 20 年 10 月 31 日之前的条件。
-
我认为没有辅助列是不可行的(我在 Google 表格中使用单个公式做了类似的事情,但更灵活一些)
-
我建议您将post this question 转至Smartsheet Community forum。 Stack Overflow 是询问与编程相关的问题的地方(例如,如果您使用 API 或 SDK 来构建与 Smartsheet 的集成),而 Smartsheet 社区论坛是询问与产品使用相关的问题的地方,例如.论坛中有一个强大的 Smartsheet 专家社区(客户和员工),他们非常适合就您所描述的场景提供反馈。
-
我有一个使用 Sortby 的可能方法 - 明天会发布一些东西。
标签: excel sum logic min smartsheet-api