多个垂直和水平标准的求和

发布于 2025-01-10 21:37:50 字数 242 浏览 3 评论 0原文

我必须总结数据如下:

标准是:纵轴为日期,横轴为单位和名称:

我必须获得客户 1、主要类别和时间段 11/2020 的总和 - 12/2021

情况示例

感谢您的帮助!

I would have to summarize data followingly:

Criterias are: date in the vertical axis, and the unit and name in the horizontal axis:

I would have to get a sum for Customer 1, main category and for time-period of 11/2020 - 12/2021

example of the situation

Thanks for help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

揽月 2025-01-17 21:37:50

您可以尝试使用 SUMPRODUCT 函数以及

单元格 J7 中使用的公式

=SUMPRODUCT((LOOKUP(COLUMN($D$1:$H$1),COLUMN($D$1:$H$1)/
($D$1:$H$1<>""),$D$1:$H$1)=$J$3)*($J$4=$D$3:$H$3)*
($J$5<=$B$4:$B$21)*($J$6>=$B$4:$B$21)*($D$4:$H$21))

解决方案

You may try using SUMPRODUCT Function as well

Formula used in cell J7

=SUMPRODUCT((LOOKUP(COLUMN($D$1:$H$1),COLUMN($D$1:$H$1)/
($D$1:$H$1<>""),$D$1:$H$1)=$J$3)*($J$4=$D$3:$H$3)*
($J$5<=$B$4:$B$21)*($J$6>=$B$4:$B$21)*($D$4:$H$21))

Solution

若能看破又如何 2025-01-17 21:37:50

假设 B 列包含日期,您可以使用 SUMIFSINDEX/MATCH

=SUMIFS(INDEX(C:F,,MATCH("Customer 1",$C$1:$F$1,0)),B:B,">="&DATE(2020,11,1),B:B,"<="&DATE(2021,12,31))

调整 C:F$C$1 中的列:$F$1 根据需要。

输入图片这里的描述

DATE 不是必需的:

=SUMIFS(INDEX(C:F,,MATCH("Customer 1",$C$1:$F$1,0)),B:B,">=11/1/2020",B:B,"<=12/31/2021")

例如,如果你想得到“Other”,只需在 MATCH 的结果上加 1 即可:

=SUMIFS(INDEX(C:F,,MATCH("Customer 1",$C$1:$F$1,0)+1),B:B,">=11/1/2020",B:B,"<=12/31/2021")

Assuming column B contains dates, you can use SUMIFS and INDEX/MATCH:

=SUMIFS(INDEX(C:F,,MATCH("Customer 1",$C$1:$F$1,0)),B:B,">="&DATE(2020,11,1),B:B,"<="&DATE(2021,12,31))

Adjust the columns in C:F and $C$1:$F$1 as needed.

enter image description here

The DATE is not necessary:

=SUMIFS(INDEX(C:F,,MATCH("Customer 1",$C$1:$F$1,0)),B:B,">=11/1/2020",B:B,"<=12/31/2021")

If you want to get "Other" for example, just add 1 to the result of MATCH:

=SUMIFS(INDEX(C:F,,MATCH("Customer 1",$C$1:$F$1,0)+1),B:B,">=11/1/2020",B:B,"<=12/31/2021")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文