Get Opening Balance from Spilled Range

gi0rg0s

New Member
Joined
Aug 24, 2016
Messages
3
I am trying to create a loan movement table using dynamic arrays as in the table below. Period column is spilled using =SEQUENCE(A1), so that it can be adjusted. My problem is that I cannot reference the prior period closing balance in the current period opening balance (red text), without creating a circular reference error. I tried using XLOOKUP, OFFSET and INDEX. The circular reference doesn't really exist, because the previous row is returned, but because Closing Balance range depends on Opening Balance range and vice versa, excel assumes it does.

PeriodOpening BalanceInterestPaymentClosing Balance
110.000100(1.000)9.100
29.100100(1.000)8.100
...............


Notes:
  1. I would rather not enable iterative calculations if they can be avoided.
  2. I can easily solve this using excel tables, but the table size cannot dynamically expand (at least not natively) and the number of periods may vary.
  3. Interest and Payment columns are proper spilled ranges in sheet, but not relevant here
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
First of all I don't understand the values in the table. Is interest a dollar amount or a percentage? 100%/12?

I would make the Closing balance just a simple formula to calculate the one line

Book5
ABCDE
1PeriodOpening BalanceInterestPaymentClosing Balance
2110.00100-19.08
329.08100-18.17
4...............
Sheet1
Cell Formulas
RangeFormula
B3B3=XLOOKUP(A3-1,A2:A4,E2:E4,0,0)
E2:E3E2=B2+((C2/100)/12)+D2
 
Upvote 0
Hi Jeffrey, thanks for helping and sorry for not explaining well. The values do not make sense as noted in note 3. Here is how my sheet looks. What I want is to reference F2 in C3 using a spill formula in C2.

I can use a workaround to solve this simple scenario by spilling loan formulas (if anyone needs the solution, here it), but not more complex ones. And there are other instances where I am modeling monthly cash flows (not on a loan) where the workaround just doesn't work. A solution would be greatly appreciated.

00. Full Template.xlsx
ABCDEFGHIJKLM
124PeriodOpeningInterestPaymentClosingPeriodOpeningInterestPaymentClosing
23%1100.000250(4.298)95.9521100.000250(4.298)95.952
3100.0002Closing#VALUE!(4.298)#VALUE!295.952240(4.298)91.894
4-4.298,12 €3Closing#VALUE!(4.298)#VALUE!391.894230(4.298)87.825
54Closing#VALUE!(4.298)#VALUE!487.825220(4.298)83.747
65Closing#VALUE!(4.298)#VALUE!583.747209(4.298)79.658
76Closing#VALUE!(4.298)#VALUE!679.658199(4.298)75.559
87Closing#VALUE!(4.298)#VALUE!775.559189(4.298)71.450
98Closing#VALUE!(4.298)#VALUE!871.450179(4.298)67.330
109Closing#VALUE!(4.298)#VALUE!967.330168(4.298)63.200
1110Closing#VALUE!(4.298)#VALUE!1063.200158(4.298)59.060
1211Closing#VALUE!(4.298)#VALUE!1159.060148(4.298)54.910
1312Closing#VALUE!(4.298)#VALUE!1254.910137(4.298)50.749
1413Closing#VALUE!(4.298)#VALUE!1350.749127(4.298)46.578
1514Closing#VALUE!(4.298)#VALUE!1446.578116(4.298)42.396
1615Closing#VALUE!(4.298)#VALUE!1542.396106(4.298)38.204
1716Closing#VALUE!(4.298)#VALUE!1638.20496(4.298)34.001
1817Closing#VALUE!(4.298)#VALUE!1734.00185(4.298)29.788
1918Closing#VALUE!(4.298)#VALUE!1829.78874(4.298)25.565
2019Closing#VALUE!(4.298)#VALUE!1925.56564(4.298)21.330
2120Closing#VALUE!(4.298)#VALUE!2021.33053(4.298)17.086
2221Closing#VALUE!(4.298)#VALUE!2117.08643(4.298)12.830
2322Closing#VALUE!(4.298)#VALUE!2212.83032(4.298)8.564
2423Closing#VALUE!(4.298)#VALUE!238.56421(4.298)4.287
2524Closing#VALUE!(4.298)#VALUE!244.28711(4.298)0
26
Sheet1
Cell Formulas
RangeFormula
B2:B25B2=SEQUENCE(A1)
C2:C25C2=IF(B2#=1,A3,F1)
D2:D25D2=C2#*$A$2/12
E2:E25E2=A4+B2#-B2#
F2:F25F2=C2#+D2#+E2#
H2:H25H2=SEQUENCE(A1)
I2:I25I2=L2#-K2#-J2#
J2:J25J2=IPMT(A2/12,H2#,A1,-A3)
K2:K25K2=A4+H2#-H2#
L2:L25L2=SCAN(A3,J2#+K2#,LAMBDA(a,b,a+b))
A4A4=PMT(A2/12,A1,A3)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top