How do I use LET, SEQUENCE, MAKEARRAY, and other functions to calculate monthly interest in Numbers?

I wanted to create monthly interest calculations table using new functions like let,sequence,make array, I created sheet and it not correctly works. I don’t know what I am making mistake or maybe not using function correctly.

can anyone help me.

I am attaching screenshots.

you can see it does calculate (not correctly) and does not make monthly table.

I have shown calculations using Let and sequence function, using array function and sequence function alone.

I also calculated value using standard math formula.

any help will be greatly appreciated.

Ashok



[Re-Titled by Moderator]

Posted on May 19, 2025 8:56 AM

Reply
Question marked as Top-ranking reply

Posted on May 20, 2025 7:13 PM

Taking fuller advantage of LET:




=LET(Principal,Inputs::B1,Rate,Inputs::B2,Months,SEQUENCE(Inputs::B3),Principal*(1+Rate/12)^Months)



The old way would be something like this:


=Inputs::$B$1*(1+Inputs::$B$2/12)^(ROW()−1)


Still works, and is more succinct. But it isn't as easy to read and needs to be filled down into the rows below instead of an automatic "spill."


SG

13 replies
Question marked as Top-ranking reply

May 20, 2025 7:13 PM in response to arp1007

Taking fuller advantage of LET:




=LET(Principal,Inputs::B1,Rate,Inputs::B2,Months,SEQUENCE(Inputs::B3),Principal*(1+Rate/12)^Months)



The old way would be something like this:


=Inputs::$B$1*(1+Inputs::$B$2/12)^(ROW()−1)


Still works, and is more succinct. But it isn't as easy to read and needs to be filled down into the rows below instead of an automatic "spill."


SG

May 20, 2025 12:17 AM in response to arp1007

arp1007 wrote:

I solved my problem I wrote this formula correctly and it spills in 12 rows as month and calculates correct value of interest
LET(Principal,B1,Rate,B2,Months,B3,Principal×(1+B2÷12)^SEQUENCE(B3))


Nice! Upvote! Your solution calculates the ending balance for each period. Here it is juxtaposed against an "old school" schedule to check its calculations. It's a lot easier, just one formula in one column!



SG

May 20, 2025 10:12 AM in response to arp1007

I don't understand the point of LET() here.


In general, LET() allows you to assign values (or calculations) to variable names and use those friendly names in a calculation rather than the more complex definition. So far, so good.


Your LET() formula defines three variables, namely, Principal, Rate and Months, however, you then ignore two of those three and never use them again, opting, instead, for the direct reference.


If you want to use LET(), then your formula should be:


=LET(Principal,B1,Rate,B2,Months,B3,Principal×(1+Rate÷12)^SEQUENCE(Months))


Now it's using the variable names defined by LET() rather than direct references to the cells. Not a big difference in this particular case, but if you're going to use LET() to define a variable you might as well use it :)

May 20, 2025 11:39 AM in response to arp1007

> Using Let function is more clean way just using one formula in one cell.


I realize that. My point was that you were using LET() to define a variable that you were never using.


For example, you're using LET to define Rate as the value of B2, but later in your function you directly reference B2 rather than the LET variable. Likewise you define Months as B2, but later reference B3 rather than the Months variable.

May 19, 2025 11:48 AM in response to arp1007

It isn't entirely clear what you're trying to do here - which cells have formulas, which cells have values, and what is wrong vs. right.

However, the first thing I see is that your SEQUENCE() function is incorrect.


The definition of SEQUENCE() is:


SEQUENCE(number of rows, number of columns, start, step)


Where start and stop are optional.


However, you're passing in two:


SEQUENCE(B3,12)


Which will create a 12 x 12 grid of values. Is that what you actually want? I can't see how that would relate to the rest of the sheet. But that may explain why Numbers is asking for 4 more columns - your table isn't big enough to hold the 12 columns and you need to add more.


Either way, it would help if you could clarify what it is you're trying to achieve here, or are you just trying different ways to get the same result (that's entirely fair, but it would help to have that understanding up front).

May 19, 2025 1:48 PM in response to Camelot

Column A is Name and Column B is values

Formula is in B5 THIS ALSO CALCULATES AS YTD NOT MONTH

I want to create 12 rows as each month and interest calculated in column 1 for each month.

Sequence (12,1,1,1)

Array calculates 12 rows but interest calculated as YTD NOT MONTHS


math calculated value is $5255.81 so there is difference in calculation.

I revise my sequence from (B3,12) to (12,1,1,1)

Thanks for your help

I hope I made it clear but let me know.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I use LET, SEQUENCE, MAKEARRAY, and other functions to calculate monthly interest in Numbers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.