Google sheets 时间序列的googlesheets数组公式
我正在制作一份谷歌工作表,该工作表根据以下信息生成月度时间序列:Google sheets 时间序列的googlesheets数组公式,google-sheets,array-formulas,Google Sheets,Array Formulas,我正在制作一份谷歌工作表,该工作表根据以下信息生成月度时间序列: 开始日期(C17) 结束日期(C18) 期初金额(C19) 本期扣除额(D19:L19) 我当前的设置如下所示: 我需要两个公式: 如果日期(B21:B)在扣除日期范围内(D17:17、D18:18),则填充列的扣除金额(D19:L19) 每月月末计算扣除后的有效金额 我之所以使用ArrayFormulas,是因为我希望普通用户在粘贴特别长的演绎细节行后,很难自动填充普通公式 时间序列表是通过从另一个表中输入数据来生成的,该
- 如果日期(B21:B)在扣除日期范围内(D17:17、D18:18),则填充列的扣除金额(D19:L19)
- 每月月末计算扣除后的有效金额
=datedif($C$17,$C$18,"M") - named range "ScheduleMonths"
月份栏:
=ArrayFormula(edate(C17,row(B1:indirect("B"&ScheduleMonths))))
每月剩余总额:
=ARRAYFORMULA(C21:indirect("C"&ScheduleMonths+20)-
D21:indirect("D"&ScheduleMonths+20)-E21:indirect("E"&ScheduleMonths+20)-
F21:indirect("F"&ScheduleMonths+20)-G21:indirect("G"&ScheduleMonths+20)-
H21:indirect("H"&ScheduleMonths+20)-I21:indirect("I"&ScheduleMonths+20)-
J21:indirect("J"&ScheduleMonths+20)-K21:indirect("K"&ScheduleMonths+20)-
L21:indirect("L"&ScheduleMonths+20))
这是我为在表格字段中使用而设置的正常公式:
=if(AND(C$17<=$B21,$B21<=C$18),C$19,"")
=if(AND)(C$17更新:我想出了在A22中如何计算扣除后金额
=ARRAYFORMULA(C22:indirect("C"&'Amplaine Auto Time Series'!ScheduleMonths+21)-SUMIF(IF(COLUMN(D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21)),ROW(D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21))),ROW(D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21)),D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21)))
随着需求的不断增长,个人扣减字段的填充工作仍在进行中。共享一份工作表副本,其中包含所需输出的示例