时间序列的Google表格数组公式

问题描述 投票:0回答:1

我正在使用Google工作表,该工作表会根据以下信息生成每月的时间序列:

  1. 开始日期(C17)
  2. 结束日期(C18)
  3. 期初金额(C19)
  4. 此期间的扣除额(D19:L19)

我当前的设置如下:

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLmltZ3VyLmNvbS9HSWh3TkIyLnBuZyJ9” alt =“当前表”>

我需要两个ArrayFormulas:

  • 如果日期(B21:B)在扣除日期范围内(D17:17,D18:18),则填充列的扣除额(D19:L19)的人
  • 每个月末计算有效的扣除后金额的方法。

我使用ArrayFormulas是因为我希望普通用户在粘贴特别长的推导详细信息行之后很难自动填充普通公式。

时间序列表旨在通过从另一张表中获取数据来生成-该表具有每月开始金额和使用开始日期,结束日期和金额字段的扣除明细。到目前为止,我已经将以下各项放在一起:

范围内的月份:

=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,"")

我期望如果日期(B21:B)处于扣除日期范围(D17:17,D18:18)之内,则所得的ArrayFormulas将使用适当的扣除额填充所有每月扣除单元。到目前为止,我只能通过常规公式实现此目标。

google-sheets array-formulas
1个回答
0
投票

更新:我想出了如何计算A22中的扣除额。

© www.soinside.com 2019 - 2024. All rights reserved.