Skip to main content
10-Marble
May 8, 2026
Solved

Solving formula with range variables in a solve block

  • May 8, 2026
  • 2 replies
  • 152 views

I am trying to compute the equivalent annual percentage rate (APR) for a series of variable deposits with variable returns.

Using the “find” function results in the error message “No solution was found...”. I tried opening up the TOL value, that didn’t help. So I tried the “minerr” function next and a different error message is displayed “Indexed assignment...”,

 

My questions are:

  • Which of the two errors is relevant?
  • Can I solve equations with indexed constraints in a solve block?

MP11 file is attached.

Thanks for your help,

Best answer by Werner_E

One possible way is to define a function which calculates the end value of the iteration for a given percentage x and use it for the constraint in the solve block.

Of course you could also calculate the end-value simpler using the summation operator:

That way you could do without defining a function but instead use the sum directly in the solve block:

 

You may also consider using the “root” function in one of its two flavor instead of the solve block:

 

2 replies

Werner_E25-Diamond IAnswer
25-Diamond I
May 8, 2026

One possible way is to define a function which calculates the end value of the iteration for a given percentage x and use it for the constraint in the solve block.

Of course you could also calculate the end-value simpler using the summation operator:

That way you could do without defining a function but instead use the sum directly in the solve block:

 

You may also consider using the “root” function in one of its two flavor instead of the solve block:

 

10-Marble
May 18, 2026

Thanks for your answer, Werner. So I guess the “Indexed assignment...” was the problem and this type of formula can’t be solved for a certain index. The formula with the range variable seemed to be a quick way to replicate an Excel table doing the same thing. This seemed easy until I was trying to solve for an index of the range variable.