Hi there,
I want to update some spreadsheets with more modern formulas like the LET function. The task is to use the LET function to create a table that shows an income stream (=monthly withdrawals) from a savings account that earns interest. In the past I used endless formulas to create each col of the table.
Screen1 shows at the top input data (still needs removal of unnecessary fields) and at the bottom the old table.
Screen 2 is the new table I would like to create with the LET function. As you can see, first two works but rest not. Current LET function I use is as follows:
=LET(
openbal,E4,
annualrate,E7,
periodrate,annualrate/12,
pv,-openbal,
inflat,E16,
monthpers, EDATE(E5,SEQUENCE(H7,1,0)),
withdrawpmts,(1+inflat)*H6,
bals,SCAN(openbal,withdrawpmts,LAMBDA(x,r,x-r)),
intearnt, bals*periodrate,
VSTACK(
HSTACK("Month","Interest","Withdrawal","Remaining Balance"),
HSTACK(monthpers,intearnt,-withdrawpmts,balls)
))
For info, interest is previous period balance multiplied with monthly interest rate, while withdrawal is previous withdrawal multiplied with monthly inflation. I think what I cant work out is how to move forwardperiod by period. I managed to get the periods into the first column but rest does not work.
I'm clearly making some mistakes here so any help would be greatly appreciated.
Cheers everyone
I want to update some spreadsheets with more modern formulas like the LET function. The task is to use the LET function to create a table that shows an income stream (=monthly withdrawals) from a savings account that earns interest. In the past I used endless formulas to create each col of the table.
Screen1 shows at the top input data (still needs removal of unnecessary fields) and at the bottom the old table.
Screen 2 is the new table I would like to create with the LET function. As you can see, first two works but rest not. Current LET function I use is as follows:
=LET(
openbal,E4,
annualrate,E7,
periodrate,annualrate/12,
pv,-openbal,
inflat,E16,
monthpers, EDATE(E5,SEQUENCE(H7,1,0)),
withdrawpmts,(1+inflat)*H6,
bals,SCAN(openbal,withdrawpmts,LAMBDA(x,r,x-r)),
intearnt, bals*periodrate,
VSTACK(
HSTACK("Month","Interest","Withdrawal","Remaining Balance"),
HSTACK(monthpers,intearnt,-withdrawpmts,balls)
))
For info, interest is previous period balance multiplied with monthly interest rate, while withdrawal is previous withdrawal multiplied with monthly inflation. I think what I cant work out is how to move forwardperiod by period. I managed to get the periods into the first column but rest does not work.
I'm clearly making some mistakes here so any help would be greatly appreciated.
Cheers everyone