 # Need to create a list which automatically calculates cell values

Hello, I am building a financial planning app and I need to create a screen which has a list with 3 columns. The first column needs to be numbered 1-50. The second column 2021-2071 and the third column needs to calculate a dollar amount in each cell. The formula in each cell needs to reference the value of the previous cell.

So the formula in column 3, row 1 needs to be:

starting cash (queried from existing collection) * interest rate (also from existing collection) + starting cash + amount saved (calculated from summing values from existing collection).

then column 3 row 2 needs to be:

value of column 3 row 1 * interest rate + value of column 3 row 1 + amount saved (calculated from summing values from existing collection).

I have not been able to figure out to to display this on a screen, welcome any ideas.

this is the table I need to create on a screen

that looks close, does the result automatically change whenever the starting cash, earned or savings changes?

Yes, what numbers do you have in mind ?

starting cash, earned or savings

how did you make this?

Adalo can do chained actions for loop too.

I don’t understand how you were able to get the ending cash to be used as the starting cash for the next year, can you share your app with me so I can see how you set it up?

is it possible to reference the cell of a previous row?

sent you private message.

@Victor would you be able to help with my issue?

Hi @traverick,

In my opinion, you should use a bit different approach. Adalo is not an Excel, you can’t create tables with cross-referenced cells here quickly and efficiently. It’s simply a different instrument There is a Compound Interest formula, see here: Compound interest - Wikipedia I used this formula in its simple configuration - where n=1 (compounding frequency is set to 1 year). Here is the result:

Please note - I did NOT do any operation with the list, cross-referencing or something like that. The result data is displayed using this formula:

And the list data itself is static and uses only the ID for the period and Year for year.

Referencing values from other entries in the list is possible in Adalo, though it could be quite complicated. I guess @Yongki has demonstrated you how this could be done.

Best regards, Victor.

2 Likes

Hi @Victor . THANK YOU THANK YOU THANK YOU! This is so amazing! Thank you! I got it to work just as you laid out.

There is one additional variable I’d like to include if at all possible. Basically, I’d like to add a constant amount each year and have that included in the compounding interest. So in simple terms it would be

principal + new amount + compounding interest
$100,000 +$5,000 + 10% interest = $115,500$115,500 + $5,000 + 10% interest =$132,550

This would give me a true estimate of future growth go principal plus new savings being added each year. Thank you again for the amazing help!!

Hi @traverick,

I think it is possible.

Searching for “formula for compound interest with annual contributions” brings some results about that, e.g. https://www.thecalculatorsite.com/articles/finance/compound-interest-formula.php or finance - Compound Interest Formula adding annual contributions - Mathematics Stack Exchange or StructX - Annual Compound Interest with Contributions Calculator (calculator and formula).

Though implementing this formula in Adalo will require some effort Best regards, Victor.

1 Like