0

在我的业务中,我所做的是提供一本 25 张优惠券的书。如果客户购买任何东西(从我给优惠券的特殊人士那里说人 A、人 B 等),人 A 给客户一张优惠券。我正在做的是在excel中维护相同的数据库。第一列有优惠券代码。然后是我详细记录的日期。然后是已售出的列,我在其中放置了已售优惠券的每日详细信息。然后我有剩余优惠券列,最后是相应优惠券簿中剩余的总优惠券

数据如下所示。

Coupon #    Date    Sold    Remaining   Starting Day Coupon Counter
Coupon A    22-Oct-12   22  3   25
Coupon B    22-Oct-12   16  9   25
Coupon C    22-Oct-12   24  1   25
Coupon A    23-Oct-12   3   0   3
Coupon B    23-Oct-12   9   0   9
Coupon C    23-Oct-12   1   0   1
Coupon D    23-Oct-12   5   20  25
Coupon E    23-Oct-12   8   17  25
Coupon F    23-Oct-12   2   23  25
Coupon D    24-Oct-12   20  0   20
Coupon E    24-Oct-12   17  0   17
Coupon F    24-Oct-12   23  0   23

我想要的是相应日期的相同数据。我正在寻找的输出如下。

Date    Sold    Remaining   Starting Day Coupon Counter
22-Oct-12   62  13  75
23-Oct-12   28  60  88
24-Oct-12   60  0   60

有什么想法可以完成吗?我知道如何得到总和,但不知道如何用任何东西过滤它。

编辑 1

我知道这可以使用宏来完成,但是我想使用 excel 中可用的预定义函数。

任何想法/建议如何完成这项工作?

4

1 回答 1

1

预先构建带有日期的报告表,然后像这样使用 SUMIF:

=SUMIF(date range, date cell (date to get information for), entire column to sum for)

这使用了法国公式,但您应该能够使其与您的工作簿一起工作,因为您知道它实际上是SUMIF

在此处输入图像描述

于 2012-10-28T20:14:51.313 回答