Goal Seek doesn't work with Indirect?

I have been troubleshooting a complex spreadsheet, at the end I think the problem reduces to the limitation that GoalSeek does not iterate (returns the starting value as the final value, and declares that the search fails) if the formulas include the Indirect function.

EG
A1 2.00
A2 =A1^2*4
A3 =INDIRECT(“A2”)

When I run Goal Seek with A2 as the target formula with target value 10, Goal Seek executes successfully and comes up with 1.5811
When I run Goal Seek with A3 as the target formula with target value 10, Goal Seek reports search fails and offers 2 as the solution.

Is this a known limitation? Is there any setting that affects this?

LibreOffice 26.8.2.2 running on MacOS 15.8.2

There is no reference to A1 in INDIRECT("A2"). So, there is no way to find a logical goal. Not sure if 2 is the better output of the function in this situation.

Why do you don’t repeat =A1^2*4 in A3?

Can you explain what are you trying to do? Maybe there is another way to do that.

1 Like

It doesn’t work when A3 = INDIRECT("A2"), but it works when A3 = A2.
Is that consistent?

Cell A3 refers to Cell A2 ( by the formula indirect(A2) ) and cell A2 refers to cell A1 (by its formula A1^2*4 ").
Without invoking Goal seek, a change in cell A1 propagates to cell A3. I can goal seek manually by changing A1 until I am close to the desired solution in A3.

With the GoalSeek function, I get “Search Failed”

As for what I am working on originally is a spreadsheet to find the Singular Values of a matrix of arbitrary size. The simple form (for fixed size arrays) allows the user to enter the inputs array A and value L. and then calculates the arrays At (A transpose), then AtA, then the Identity matrix I, then AtA-LI and then calculates the determinant from MDETERM() on AtA-LI. Finally GoalSeek is used to vary L until the determinant is 0; this value of L is one of the singular values of A.
If you are not familiar with the Singular Value Decomposition (SVD) and Eigenvalues, this is probably pretty hard chewing.

However, every array expression above has to be reinitialized when the size of the input array changes. eg 2x2, 3x3, 3x2, 4x5 etc.
I realized that if I can determine the rows and columns of the matrix A, then using Indirect I can make all these calculations into a one line expression, and the result is a scalar. There are no intermediate results which are arrays, so no array expressions need to be reinitialized because the dimensions have changed.
I found that I could search for the zero result manually, but with goal seek it results in “search Failed”

Finally I found that if I reduced the problem to a GoalSeek of a simple meaningless calculation also involving the Indirect function, that Goal Seek would still fail.

If I use Goal Seek on simple formula without Indirect (cell A2) , it is successful .
If I use Goal Seek on simple formula with Indirect (cell A3) , it fails.

This qualifies as a limitation of the GoalSeek tool or a bug in Indirect() and should be documented.

Correct. Even more simply,
When Goal seek uses A2 as the target, the search is successful.
When Goal Seek uses A3 (which is just a copy of A2 by INDIRECT()) as the target, the search fails.

Add cell A4 = Index(A2)
When Goal Seek uses A4 as the target, the search is successful.

I suggest what we have here is a limitation of the GoalSeek tool, which is caused by a bug or limitation of Indirect() that causes it not to update its result when the Goal Seek tool changes an input.

I think this should be added to the documentation of the GoalSeek tool and of the Indirect function. As I am very new here, I don’t know how that process would work.

I have since developed a workaround to my original problem using Index() and Sequence() instead of Indirect(). I would share the working spreadsheet except I don’t know how to do that.

Interestingly, if INDIRECT is used to combine the address, it works: =INDIRECT("A"&"2")

Click the 7th icon from the left, it has an up-pointing arrow and tooltip Upload

1 Like