【发布时间】:2021-02-15 07:13:57
【问题描述】:
所以我想计算每个月的租金。我面临的问题是开始日期和结束日期可能在月中。
例如:
Rent = 10,000
Starting date = 15/04/2020
Ending date = 10/10/2020
我希望我的 excel 表相应地拆分如下: First sample row of the excel
在我的 Excel 表格中,我有不同的租金金额和不同的开始/结束日期。 这是我尝试过但惨败的方法:
> =$F3/(12*DAY(EOMONTH(H$1,0)))*(IF(MONTH($C3)<=MONTH(H$1),IF(MONTH($C3)=MONTH(H$1),(EOMONTH($D3,0)-$D3),DAY(EOMONTH(H$1,0))),0))
其中 F 是 RENT 所在的位置,H1 是一月,C3 是开始日期,D3 是结束日期。当我在整个工作表中自动填充公式时,我希望它能够工作。
请帮忙!
@Hooded0ne 我在表格中的所有示例中都尝试了您的公式,但在某些情况下似乎存在问题:
- When start date is 2019 and end date is 2020。这应该只显示到四月的租金。
- Same case as above, December 2020 is only till the 14th, it should only calculate for the first 15 days
块引用
【问题讨论】:
标签: excel excel-formula