跳到主要内容

如何在Excel中计算给定日期/年的星期结束日期?

在某些情况下,您可能需要计算给定日期的星期结束日期,以便更好地跟踪和监督工作任务。 在本文中,我介绍了一些技巧,这些技巧可以快速计算给定日期的星期结束日期,或在Excel中列出给定年份的所有星期结束日期。

计算日期的星期结束日期

列出给定年份的所有星期结束日期


箭头蓝色右气泡 计算日期的星期结束日期

下面的公式可以帮助您计算给定日期的星期结束日期。

例如,在这里我们将星期六设置为一周的结束日期,请执行以下操作:

选择要计算其周结束日期的日期旁边的空白单元格,例如B6,然后输入此公式 = A6 +7-星期六(A6), 按 输入 键,将填充手柄向下拖动到此公式所需的单元格。 看截图:
文档周结束日期1

Tips::如果您希望使用星期五作为结束日期,则只需进行更改 7 在公式中改为6,如果您想使用星期日,请将7改为8,依此类推。


箭头蓝色右气泡 列出给定年份的所有星期结束日期

例如,如果要列出给定年份的所有星期结束日期,例如要列出2016年的所有星期六,请执行以下步骤:

1.选择一个空白单元格A2,然后输入要列出其结束日期的年份。 看截图:
文档周结束日期2

2.在单元格B2中,输入此公式 = DATE(A2,1,1)+ 7-WEEKDAY(DATE(A2,1,1)),A2是要使用的年份,请按 输入 键,您可以看到已显示该年的第一周结束日期。 看截图:
文档周结束日期3

3.转到C2,然后输入此公式 =IF(YEAR(B2+7)=$A$2,B2+7,""),然后将“自动填充”手柄向右拖动到单元格以列出一年中的所有星期结束日期。 看截图:
文档周结束日期4

提示:

(1)公式 =IF(YEAR(B2+7)=$A$2,B2+7,"") 将返回5位数字而不是日期。 请选择并单击以更改5位数字为最新日期 主页 > 数字格式 > 短期约会.

(2)如果要列出一年中的所有星期五,请将公式更改为 = DATE(A2,1,1)+ 7-WEEKDAY(DATE(A2,1,2))


在Excel中轻松地将天/年/月/小时/分钟/秒添加到日期时间

假设您在一个单元格中有一个日期时间格式数据,现在您需要在该日期中添加若干天,年,月,小时,分钟或秒。 通常,使用公式是所有Excel用户的第一种方法,但是很难记住所有公式。 用 Kutools for Excel日期和时间助手 实用程序,您可以轻松地将天,年,月,小时,分钟或秒添加到日期时间,此外,您可以计算出日期差或基于给定生日的年龄,而无需记住任何公式。 点击即可获得 30 天的全功能免费试用!
doc第二小时添加小时
 
Kutools for Excel:拥有300多个便捷的Excel加载项,可以在30天内免费试用。

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This formula is incorrect, it works fine until you get to the last day of the week and then it gives the end of the following week as the result.

I'm not yet sure on a fix but have seen two versions of this basic formula on different threads and neither calculate correctly.
This comment was minimized by the moderator on the site
Hello!
I played around with the formula and found this might answer the problem =Cell reference+7-WEEKDAY(Cell reference-1)
Example - date I need end of week calculated on is in Cell reference A4 -my formula is therefore = A4+7-WEEKDAY(A4-1).
This comment was minimized by the moderator on the site
How do I get week start - end of week on one excel cell
I.e. 06 Jan - 12 Jan and so on to make a list of working weeks

Thanks
This comment was minimized by the moderator on the site
Thanks for the formula. I have a Timesheet where I want the week ending date for Monday through Sunday to calculate as Friday's date of that week. I edited the formula as follows:

=IF(C2<>"Sun",B2+6-WEEKDAY(B2),B1+6-WEEKDAY(B1))
This comment was minimized by the moderator on the site
Sorry, Jeff Davis, I do not understand your question, can you take some examples for explain?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations