CF_SumByYear function

Actuarial Excel Addin

The CF_SumByYear function returns one yearly cash-flow vector equal to the year-by-year sum of several cash-flow series arranged by row. It is designed for row-oriented cash-flow layouts (one series per row), including outputs from JS and JL when these functions are used with a non-zero cash_flow parameter.

* : Required parameter

Parameters
Default
Description
cash_flow_rows *
--
One or more yearly cash-flow arrays arranged by row. Each argument may be a spilled vector, or a two-dimensional range where each row represents one cash-flow series.

Example
Result
CF_SumByYear(A2#, B2#)
Returns a spilled yearly vector equal to A2# plus B2#, year by year.
CF_SumByYear(A2:DP10)
Treats each row of the range as one cash-flow series and returns the year-by-year (also column-by-column) sum.
CF_SumByYear(JS(65, ..., cash_flow=750), JS(...), ...)
Combines yearly cash flows of annuitants receiving different pensions.

Notes
Description
Return shape
The function returns a spilled vector.
Different lengths
If the supplied vectors do not all have the same length, missing years in the shorter vectors are treated as zero.
Range input
When a two-dimensional range is supplied, each row is treated as one cash-flow series and each column represents one cash-flow year.
Blank cells
Blank and missing cells inside a range are ignored.
Typical use
This helper is useful when cash-flow data is laid out horizontally by year and several member-level rows must be aggregated before further analysis.