lori_m
Hi Lori, it is curious that PQ should have Accumulate as a list operator whereas, to date, such capability has been missing from Excel. That is, Scan only really makes sense in the context or arrays and not lists, since the result depends on sort order.
[by a list, I refer to a set of objects in which order is unimportant - normally accessed by key versus an array, by which I mean an ordered list - normally accessed by index or a combination of such]. Fortunately, it appears that list.accumulate does order the parameters is the order we are requesting.
Since I am unable to try the functions at present, can you tell by inspection of the syntax, whether the SCAN combinator is applicable to amortisation and depreciation schedules in which there is both a percentage change based upon the prior value and an additive change (loan repayment or capital purchase). I am hopeful but find it difficult to find my way through the calculation as an exercise in mental arithmetic, you can at least revert to the Python equivalent.
If I wanted to apply the SCAN function to a ballistics calculation, the state needs to be represented by a vector of position and velocity, so the accumulator needs to be a vector, as you propose.
There have been two mentions of UDFs. So far they have been carried through within the context of dynamic arrays but it is one of the hopes that I have of Lambda functions that the need for UDFs is reduced dramatically. My main use for VBA is not for writing UDFs but, rather, for writing event handlers (sadly not possible in TypeScript?).