Compound interest with variable contributions

I am struggling to find a way to create a compound interest calculator that can handle variable contributions month to month. Because excel can reference the cell in a row above, I am able to write formulas that allow for September monthly contributions to a 401k be $xx.xx and October to be less or $0 due to the IRS contribution limit being reached in September. Or for contributions to be $10k in 2027 but in 2028 the contributions are higher because the hourly wage increased or the amount of hours worked increased. I can’t find a way to avoid circular dependency in glide apps to achieve the same functionality.

To do the same thing that you do in Excel, you probably want use case number 2 in this post to get a row number.

Once you have that, create a math column to subtract 1 from that row number.

Then create a Single Value column, Get: ‘From start’, Row: ‘math column’, From: ‘Table->Whole Row’.

Finally create a lookup to retrieve the previous row value from the single value column.