Forum Discussion

James_Buist's avatar
James_Buist
Brass Contributor
Oct 21, 2024
Solved

Return of the Corkscrew with Spilled Arrays

  I'm starting a new topic but do want to refer to PeterBartholomew1 post  on accumulators here https://techcommunity.microsoft.com/t5/excel/ways-of-performing-accumulation-with-dynamic-arrays/m-p/...
  • djclements's avatar
    Oct 23, 2024

    James_Buist Just for good measure, MMULT can also get the job done with minimal effort.

     

    Closing Balance (cell G22):

    =LET(
        data, HSTACK(F22:F24,G12:M14+G17:M19),
        cId, SEQUENCE(,COLUMNS(data)),
        arr, MMULT(--data,--(DROP(cId,,1)>=TOCOL(cId))),
        VSTACK(arr,BYCOL(arr,SUM))
    )

     

    Cheers!

Resources