RollRowsλ() is a two dimensional version of Rollingλ(). It applies Rollingλ() to each row in a two dimensional array/range.
RollRowsλ( Array, [Size], [Offset], [AllowPartial], [Function] )
Array
(Required) A two dimensional array or range of values to roll the window over.
Size
(Optional) Window's size (number of values selected). Must be > 0. Default is 3
Offset
(Optional) Number of values to right (+) or Left (-) of current position. Defaults to -2.
AllowPartial
(Optional) TRUE (default) Apply function to selected cells in window.
Function
(Optional) An Excel function or LAMBDA accepting an array of values. Common choices are: SUM, MIN, MAX, and AVERAGE. Default is SUM.
In this example we are calculating straight line depreciation for capital expenditures with a 5 year useful life.
The following functions are provided for those who prefer not to enter functions as parameters/arguments.
RollingAvgλ( Row, [Size], [Offset], [AllowPartial]) - Same as Rollingλ( Row, Size, Offset, AllowPartial, AVERAGE)
RollingMaxλ( Row, [Size], [Offset], [AllowPartial]) - Same as Rollingλ( Row, Size, Offset, AllowPartial, MAX)
RollingMinλ( Row, [Size], [Offset], [AllowPartial]) - Same as Rollingλ( Row, Size, Offset, AllowPartial, MIN)
RollingSumλ( Row, [Size], [Offset], [AllowPartial]) - Same as Rollingλ( Row, Size, Offset, AllowPartial, SUM)