excel表格如何根据续费月数,计算到期日的?
时间:2022-10-10 01:50:56
某服务公司,根据客户续缴费月份数,计算服务到期日。
如下表:
公式实现
在D2单元格输入公式:
=DATE(YEAR(B2),MONTH(B2)+C2,DAY(B2)),向下填充,即可得到所有的到期日。
如图:
本题目解决的关键是:
每个月的天数不一,不能直接将月份转换成天数与原日期相加,需要将B列起始日期分年月日,单独对月份加续费月数。
如果月数相加大于12,则会自动进位到年份。
附:DATE函数用法
功能:
返回表示特定日期的连续序列号。
语法:
DATE(year,month,day)
参数:
Year :必需。year 参数的值可以包含一到四位数字。Excel 将根据计算机正在使用的日期系统来解释 year 参数。默认情况下,Microsoft Excel for Windows 使用的是 1900 日期系统,这表示第一个日期为 1900 年 1 月 1 日。
month:必需。 一个正整数或负整数,表示一年中从 1 月至 12 月(一月到十二月)的各个月。
day:必需。 一个正整数或负整数,表示一月中从 1 日到 31 日的各天。
标签:Excel函数,excel函数公式,excel表格制作,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Word翻译功能在哪?Word自带的翻译工具使用方法
2023-05-21 23:44:22
![](https://img.aspxhome.com/file/2023/5/31065_0s.png)
如何在Word 2016中的文本中插入图片?
2022-08-12 13:49:13
word如何数出文章的字数?
2023-11-29 20:17:58
![](https://img.aspxhome.com/file/2023/5/17935_0s.jpg)
word中哪些烦人横线到底有多少种
2022-10-15 06:25:41
![](https://img.aspxhome.com/file/2023/2/33052_0s.gif)
Word怎么输入上标或下标?Word输入平方米符号、上标、下标脚标方法
2023-01-09 10:52:54
![](https://img.aspxhome.com/file/2023/3/28813_0s.png)
excel2016怎么天机并使用数据分析模块?
2023-02-05 16:26:22
![](https://img.aspxhome.com/file/2023/0/a141550_0s.jpg)
Excel如何设置工作表数据对齐的方式
2023-10-14 14:43:31
![](https://img.aspxhome.com/file/2023/6/42726_0s.jpg)
如何输入乘号和除号的方法
2022-03-15 00:23:42
open office文档中怎么插入特殊字符?
2023-09-02 23:43:33
![](https://img.aspxhome.com/file/2023/3/15853_0s.jpg)
Word阅读突出显示时文字底色是黑色导致文字看不见怎么解决?
2022-01-16 16:52:29
![](https://img.aspxhome.com/file/2023/1/28351_0s.jpg)
Win10移动热点打不开怎么办?Win10移动热点打不开解决方法
2023-11-21 18:54:07
![](https://img.aspxhome.com/file/2023/7/50177_0s.png)
MindMapper导图插入怎么到Word
2023-12-01 13:49:45
![](https://img.aspxhome.com/file/2023/0/19360_0s.png)
win10要如何重建索引?win10重建索引设置教程?
2023-09-12 15:29:27
![](https://img.aspxhome.com/file/2023/5/47215_0s.jpg)
iOS14.5正式版本周要到,为什么不推荐你马上升级?
2023-11-07 16:49:21
![](https://img.aspxhome.com/file/2023/4/45974_0s.png)
word2003怎么给文字添加双曲线边框效果?
2022-09-10 23:26:43
![](https://img.aspxhome.com/file/2023/6/22816_0s.png)
word文档怎么设置不显示封面页码?
2023-06-02 19:19:51
![](https://img.aspxhome.com/file/2023/1/29021_0s.jpg)
Word2007中进行页码设置的操作技巧
2022-09-15 22:57:46
Win10夜间模式失效怎么办?Win10夜间模式出现Bug怎么办?
2023-05-25 19:12:56
![](https://img.aspxhome.com/file/2023/5/52135_0s.jpg)
Word水印技巧大全!不管是想去水印还是想加水印!办法这里都有
2023-05-27 02:35:11
![](https://img.aspxhome.com/file/2023/0/34230_0s.png)
在Word中加页码的三种常用方法
2022-11-16 07:59:15
![](https://img.aspxhome.com/file/2023/3/30043_0s.jpg)