Suppose in MS Excel we have cells with values:

A1=3, A2=4

And cells with formulas:

A3=A1+A2
A4=A3*A1

Is there any automatic way (macro or other tool) that would change the last formula in A4 into:

A4=(A1+A2)*A1

So it nests all former functions in brakets creating one long formula out of many formulas in a worksheet. The final formula would refer only to cells with values (not formulas).