excel时间总和_Excel中日期范围的总和

本文介绍了如何在Excel中使用SUMIFS和SUMIF函数计算日期范围内的总和。通过设定开始和结束日期,可以轻松求出指定时间段内的销售总量或其他数值。无论你是Excel 2007及以后版本的用户,还是使用更早版本,都能找到适合的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

excel时间总和

First, some news about the upcoming Office 365 launch, and then a tip on how to sum for a date range in Excel.

首先,有关即将推出的Office 365的一些新闻,然后是有关如何汇总Excel中日期范围的提示。

Office 365启动 (Office 365 Launch)

Instead of desktop versions of Office, Microsoft is encouraging people to subscribe to an online version. If you'd like to see a preview of Office 365, you can attend Microsoft's online launch of the Office 365 product tomorrow, Wed. Feb. 27th. There are two sessions:

Microsoft鼓励人们订阅联机版本,而不是桌面版本的Office。 如果您想查看Office 365的预览,可以参加明天星期三在Microsoft在线发布的Office 365产品。 2月27日。 有两个会话:

  • 8 AM Pacific Time

    太平洋时间上午8点
  • 5 PM Pacific Time

    太平洋时间下午5点

To register, click here, and fill in the registration form: Office 365 Launch Registration

若要注册,请单击此处,然后填写注册表格: Office 365启动注册

There are lots of required fields in that registration form, but you can use the check boxes at the bottom, to control what type of email you get from Microsoft, after signing up.

该注册表单中有很多必填字段,但是您可以使用底部的复选框来控制注册后从Microsoft收到的电子邮件类型。

日期范围内的总金额 (Sum Amounts in a Date Range)

While you’re waiting for the Office 365 Launch to start, you could calculate how many units of your top product have been sold.

在等待Office 365启动启动时,可以计算出已售出多少件顶级产品。

If you’re using Excel 2007 and later, use the SUMIFS function, and for earlier versions, use the SUMIF function.

如果您使用的是Excel 2007及更高版本,请使用SUMIFS函数 ,对于早期版本,请使用SUMIF函数

In this example, a Start date and an End date are entered on the worksheet. Dates are in column A, and units sold are in column B.

在此示例中,在工作表上输入开始日期和结束日期。 日期在A列中,出售的单位在B列中。

sumdaterange01

使用SUMIFS计算日期范围内的总计 (Use SUMIFS to Calculate Total for a Date Range)

The SUMIFS function to calculate a total based on multiple criteria. We'll use a SUMIFS formula to total all the units where the sales date is:

SUMIFS函数可基于多个条件来计算总数。 我们将使用SUMIFS公式对销售日期为的所有单位进行总计:

    • AND

  • on or before the End date.

    在结束日期或之前。

Here is the formula that is entered in cell D5:

这是在单元格D5中输入的公式:

=SUMIFS($B$2:$B$9,$A$2:$A$9,">=" & $D$2, $A$2:$A$9,"<=" & $E$2)

= SUMIFS( $ B $ 2:$ B $ 9 , $ A $ 2:$ A $ 9 , “> =”&$ D $ 2 , $ A $ 2:$ A $ 9 , “ <=”&$ E $ 2 )

  • Range $B$2:$B$9 has the numbers that we want to sum.

    范围$ B $ 2:$ B $ 9具有我们要求和的数字。

  • Range $A$2:$A$9 contains the sales dates.

    范围$ A $ 2:$ A $ 9 包含销售日期 。

  • The first criterion, ">=" & $D$2, is the range with the value for criteria 1 (the Start date), and the operator to use with that value (greater than or equal to)

    第一个条件“> =”&$ D $ 2是具有条件1值(开始日期)的值的范围,以及要与该值一起使用的运算符(大于或等于)

  • The second criterion, "<=" & $E$2, is the range with the value for criteria 2 (the End date), and the operator to use with that value (less than or equal to)

    第二个条件“ <=”&$ E $ 2是具有条件2值(结束日期)的范围,并且运算符使用该值(小于或等于)

sumdaterange02

验证总数 (Verify the Total)

In this example, the result for the selected date range is a total of 494 units sold. To verify, you can select cells B3:B6, and look at the total shown in Excel's Status Bar.

在此示例中,所选日期范围的结果是总共售出494个单位。 要进行验证,可以选择单元格B3:B6,然后查看Excel状态栏中显示的总数。

sumdaterange03

To get the total units for a different date range, change the Start date in cell D2, and/or the End date in cell E2.

若要获取不同日期范围内的总单位,请在单元格D2中更改开始日期,和/或在单元格E2中更改结束日期。

使用SUMIF计算日期范围的总计 (Calculate Total for a Date Range with SUMIF)

If you’re using Excel 2003, the SUMIFS function isn’t available, but you can calculate the total for a date range with the SUMIF function.

如果您使用的是Excel 2003,则无法使用SUMIFS函数,但是可以使用SUMIF函数计算日期范围内的总数。

To see the details, and to download the sample file, visit my Contextures website: Sum Amounts in a Date Range with SUMIF

若要查看详细信息并下载示例文件,请访问我的Contextures网站: 使用SUMIF的日期范围内的总金额

观看视频 (Watch the Video)

To see the steps for creating a SUMIFS formula, and verifying the total, watch this short video.

要查看创建SUMIFS公式并验证总数的步骤,请观看此简短视频。

演示地址

翻译自: https://contexturesblog.com/archives/2013/02/26/sum-for-a-date-range-in-excel/

excel时间总和

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值