Excel 设置介于两个日期之间的特定日期

Excel 设置介于两个日期之间的特定日期,excel,excel-formula,Excel,Excel Formula,我需要一个以25号为日期的单元格(称之为“Z单元格”)。此日期必须介于两个日期范围之间 例如: Cell A - Start date = 15th January 2015 Cell B - End date = 15th February 2015 Cell A - Start date = 15th February 2015 Cell B - End date = 15th March 2015 在这种情况下,单元格Z应设置为2015年1月25日。 当单元格A和B发生变化时,

我需要一个以25号为日期的单元格(称之为“Z单元格”)。此日期必须介于两个日期范围之间

例如:

Cell A - Start date = 15th January 2015
Cell B - End date   = 15th February 2015
Cell A - Start date = 15th February 2015
Cell B - End date   = 15th March 2015
在这种情况下,单元格Z应设置为2015年1月25日。

当单元格A和B发生变化时,例如:

Cell A - Start date = 15th January 2015
Cell B - End date   = 15th February 2015
Cell A - Start date = 15th February 2015
Cell B - End date   = 15th March 2015
在这种情况下,单元格Z应自动更新到2015年2月25日。

我应该在单元格Z中写入什么逻辑来实现这一点?

这将起作用:

=EOMONTH(A1,-(DAY(A1)<26))+25
=EOMONTH(A1,-(DAY)(A1)这将起作用:

=EOMONTH(A1,-(DAY(A1)<26))+25

=EOMONTH(A1,-(DAY)(A1)您的两个示例都满足于一个简单的
=A1+10
。我在这里缺少什么?您的两个示例都满足于一个简单的
=A1+10
。我在这里缺少什么?