提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何在Excel中按日期/月/年和日期范围进行标识?

例如,我们有一个成员名单以及他们的生日,现在我们正准备为这些成员制作生日贺卡。 在制作生日贺卡之前,我们必须计算出特定月份/年份/日期中有多少个生日。 在这里,我将通过以下方法通过Excel中的公式按日期/月份/年份和日期范围指导Countif:

Office选项卡在Office中启用选项卡式编辑和浏览,使您的工作更轻松......
Kutools for Excel解决了您的大多数问题,并使您的生产率提高了80%
  • 重用任何东西: 将最常用或最复杂的公式,图表和其他任何内容添加到您的收藏夹中,并在将来快速重复使用它们。
  • 超过20文本功能: 从文本字符串中提取数字; 提取或删除部分文本; 将数字和货币转换为英语单词...
  • 合并工具:多个工作簿和表格合二为一; 合并多个单元格/行/列而不丢失数据; 合并重复行和总和...
  • 拆分工具:根据价值将数据拆分为多个表格; 一个工作簿到多个Excel,PDF或CSV文件; 一列到多列......
  • 粘贴跳过 隐藏/过滤行; 数和总和 按背景颜色; 创建邮件列表和 通过Cell的价值发送电子邮件...
  • 超级过滤器: 创建高级过滤方案并应用于任何工作表; 排序 按周,日,频率等; 筛选 通过大胆,公式,评论......
  • 超过300强大的功能; 与Office 2007-2019和365一起使用; 支持所有语言; 在您的企业或组织中轻松部署。

Countif按特定的月份/年份和日期范围使用Excel中的公式

在本节中,我将介绍一些公式以在Excel中按某个月份,年份或日期范围对生日进行计数。

Countif某个月

假设您要计算8特定月份中的生日,您可以在下面的公式中输入空白单元格,然后按 输入 键。

= SUMPRODUCT(1 *(MONTH(C3:C16)= G2))

备注:

在上面的公式中,C3:C16是您要在其中计算生日的指定的“生日”列,而G2是具有特定月份数字的单元格。

您也可以应用此数组公式 = SUM(IF(MONTH(B2:B15)= 8,1)) (按Ctrl + Shift + Enter键)以按特定月份计算生日。

某年的Countif

1988说,如果您需要计算某一年的生日,则可以根据需要使用以下公式之一。

= SUMPRODUCT(1 *(YEAR(C3:C16)= 1988))
= SUM(IF(YEAR(B2:B15)= 1988,1))

注意:第二个公式为数组公式。 请记住按 按Ctrl + 转移 + 输入 输入公式后键入;

在某个日期之前

如果需要按特定日期计数(例如1992-8-16),请应用以下公式,然后按Enter键。

=COUNTIF(B2:B15,"1992-8-16")

按特定日期范围计数

如果您需要计算是否晚于或早于特定日期(例如1990-1-1),则可以应用以下公式:

= COUNTIF(B2:B15,“>”和“1990-1-1”)
= COUNTIF(B2:B15,“<”&“1990-1-1”)

要计算两个特定日期之间的间隔(例如1988-1-1和1998-1-1之间的间隔),请应用以下公式:

=COUNTIFS(B2:B15,">"&"1988-1-1",B2:B15,"<"&"1998-1-1")

注意丝带 公式太难记了? 将公式保存为自动文本条目,以便将来只需点击一下即可重复使用!
阅读全文... 免费试用

轻松计算 Excel中的会计年度,半年,周号或星期几

Kutools for Excel提供的数据透视表特殊时间分组功能可以添加一个帮助器列以根据指定的日期列计算会计年度,半年度,周数或星期几,并让您轻松地计算,求和,或根据新的数据透视表中的计算结果得出的平均列。 全功能免费试用30天!

Kutools for Excel -包括多个用于Excel的300便捷工具。 全功能免费试用30天,无需信用卡! 现在加入

Countif按Excel中的指定日期,年份或日期范围

如果你安装了Kutools for Excel,你可以应用它 选择特定单元格 实用程序可以轻松地在Excel中按指定日期,年份或日期范围计算出现次数。

Kutools for Excel-包括多个用于Excel的300便捷工具。 全功能免费试用30天,无需信用卡! 现在加入

1。 选择您将计入的生日专栏,然后单击 Kutools > 选择 > 选择特定单元格。 看截图:

2。 在打开选择特定单元格对话框中,请按照上面的屏幕截图所示执行操作:
(1)在 选择类型 部分,请根据需要选择一个选项。 在我们的案例中,我们检查了 细胞 选项;
(2)在 具体类型 部分,选择 大于或等于 从第一个下拉列表中,然后在右边框中键入指定日期范围的第一个日期; 接下来选择 小于或等于 从第二个下拉列表中选择,然后在右侧框中键入指定日期范围的最后一个日期,然后检查 选项;
(3)点击 Ok 按钮。

3。 现在弹出一个对话框,并显示已选择多少行,如下图所示。 请点击 OK 按钮关闭此对话框。

备注:
(1)为了计算指定年份的发生次数,只需指定从今年的第一个日期到今年的最后一个日期的日期范围,例如从 1/1/199012/31/1990.
(2)按照指定的日期(如9 / 14 / 1985)计算出现次数,只需在Select Specific Cells对话框中指定设置,如下所示:


演示:按Excel中的日期,工作日,月份,年份或日期范围标识Countif

在这个视频中, Kutools Kutools Plus 选项卡添加 Kutools for Excel。 如果需要,请点击 30天免费试用,不受限制!

相关文章:


Kutools for Excel解决了您的大多数问题,并使您的生产率提高了80%

  • 重用: 快速插入 复杂的公式,图表 以及你以前用过的任何东西; 加密单元格 密码; 创建邮件列表 并发送电子邮件...
  • 超级方程式酒吧 (轻松编辑多行文字和公式); 阅读布局 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不丢失数据; 分裂细胞含量; 组合重复的行/列...防止重复的细胞; 比较范围...
  • 选择复制或唯一 行; 选择空行 (所有细胞都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择......
  • 精确复制 多个单元格而不更改公式参考; 自动创建参考 多张表; 插入项目符号,复选框等等......
  • 提取文本,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级过滤器 (将过滤方案保存并应用到其他工作表); 高级排序 按月/周/日,频率等; 特殊过滤器 用粗体,斜体......
  • 结合工作簿和工作表; 根据键列合并表; 将数据拆分为多个表格; 批量转换xls,xlsx和PDF...
  • 超过300强大的功能。 支持Office / Excel 2007-2019和365。 支持所有语言。 在您的企业或组织中轻松部署。 全功能30天免费试用。
kte tab 201905

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Roxie · 7 months ago
    What would you do if you have 1 column of events within a date range and need to count if those events had a date in another column?

    Example: I have column B as the event dates which vary each month. Column D has the date they came into a consultation. I'm trying to count how many people from that specific event for a date range came to a consultation for any date.
  • To post as a guest, your comment is unpublished.
    RHON · 8 months ago
    JAN = 1
    FEB = 2
    ..
    ..
    DEC = 12 ? NOT CORRECT RESULT IN DECEMBER
    • To post as a guest, your comment is unpublished.
      kellytte · 8 months ago
      Hi Rhon,
      Could you describe more about the error? Does the error come out when converting December to 12, or when counting by “12”?
  • To post as a guest, your comment is unpublished.
    mary · 9 months ago
    How can I count a cell on a specific day of the week. For example, I want to find a number of something on the first Sunday of the month
    • To post as a guest, your comment is unpublished.
      kellytte · 8 months ago
      Hi mary,
      In your case, you should count by the specified date. For example, count by the first Sunday of Jan, 2019 (in other words 2019/1/6), you can apply the formula =COUNTIF(E1:E16,"2019/1/6")
  • To post as a guest, your comment is unpublished.
    Sommen · 1 years ago
    rumus ini = SUMPRODUCT (1 * (YEAR (B2: B15) = 1988)) kalau datanya (range) sampe 20ribu ko ga bisa ya?
  • To post as a guest, your comment is unpublished.
    Agata · 1 years ago
    Thank you!
  • To post as a guest, your comment is unpublished.
    IvTe · 1 years ago
    I have a monthly report but need to count only daily data. I don't know to use Today option if formula is =COUNTIF(A1:A50,"RR")=TODAY(). Please help
    • To post as a guest, your comment is unpublished.
      kellytte · 9 months ago
      Hi IvTe,
      Do you need to count data meeting two conditions? You can use the COUNTIFS function.
  • To post as a guest, your comment is unpublished.
    Willie Pettigrew · 1 years ago
    in Excel 2103 I have a long list of date and times, i am trying to calculate the number between each half hour, e.g. 8am and 8.30am on each date. Can you assist?
    • To post as a guest, your comment is unpublished.
      kellytte · 9 months ago
      Hi Willie,
      You can do as follows:
      (1) Add a new column and round time data to half hour by the formula =MOD(INT(A2/(1/48))*(1/48),1) (A2 is the time cell)
      (2) Select the data range including the new column, create a pivot table.
      (3) In the PivotTable Fields pane, set date and the new half hour as Row fields, set the data you will sum or count as Value field.
      (4) Turn off the grouping in the PivotTable.
  • To post as a guest, your comment is unpublished.
    jimmy · 1 years ago
    =SUMPRODUCT(1*(MONTH(B2:B15)=8))

    I need to add 'exclude blank cells', please help.
    • To post as a guest, your comment is unpublished.
      kelly001 · 1 years ago
      Hi jimmy,
      Blank cells won’t affect the calculation result of this formula =SUMPRODUCT(1*(MONTH(B2:B15)=8))
      • To post as a guest, your comment is unpublished.
        deepak · 1 years ago
        i have on sheet where in daily sales add in a single day
        08-Feb-18 AMIT SHARMA
        08-Feb-18 AVINASH KUMAR
        08-Feb-18 SANJAY SEHGAL
        09-Feb-18 hay
        09-Feb-18 ravi

        but i need on second sheet
        08-Feb-18 3
        09-Feb-18 2

        so pleaase tell me farumula for this counts total sales at other sheet
        • To post as a guest, your comment is unpublished.
          kelly001 · 1 years ago
          Hi Deepak,
          Just add the sheet name before referenced cells. For example your data is in Sheet1, and you want to count the sales in Feb, you can modify the formula as =SUMPRODUCT(1*(MONTH(Sheet1!B2:B15)=2))
  • To post as a guest, your comment is unpublished.
    deepak · 2 years ago
    I WANT ANSWER 1 DAY( WITH EXAMPLE FORMULA)
    COUNT BETWEEN :- 01/01/2004 TO 01/01/2004 = 1 DAY
    WHICH FORMULA WILL APPLY
    • To post as a guest, your comment is unpublished.
      SANJU · 1 years ago
      =A2-A1+1
      OR
      =END DATE - START DATE + 1
  • To post as a guest, your comment is unpublished.
    TrevorC · 3 years ago
    I'm trying to create a table that counts the number of times a device has been used each month from another table which shows the date in cell a and then in cell b,c,d is a 1 if that device is being used on that date. So, on Sheet 2, is a table with Date (A1) Device 1 (B1) Device 2 (C1) Device 3 (D1). I would enter the date 01/01/16 in cell A1 and lets say Device 3 is being used so I would put a '1' in cell D1. on 02/01/16 device 2 is used so I would enter the date and put a '1' in cell C1. So on and so forth.
    On Sheet 1, is a summary table which tells me how many times Device 1 has been used each month. So, in A2 I have the Month 'January', A3 'February' etc, in cell B2, Device 1, Cell C2, Device 2 etc. I want a total count. Is that possible?
  • To post as a guest, your comment is unpublished.
    L · 3 years ago
    I am using =COUNTIFS(E2:E900,">"&"6/1/2015",E2:E900,"
  • To post as a guest, your comment is unpublished.
    Ross · 4 years ago
    Hi

    I am trying to use a formula to count how many dates are passed a changing date, e.g TODAY()-330.
    I need this to continue to change as it is for expiring training courses

    What I have been using is =COUNTIFS(C3:C28,"