按日期汇总和

时间:2012-10-28 19:19:12

标签: excel excel-2007 excel-formula

在我的事业中,我所做的是提供一本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

我知道可以使用Macro完成thi,但是我想使用excel中提供的预定义函数。

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

1 个答案:

答案 0 :(得分:1)

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

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

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

enter image description here

相关问题