#### Kelvin Stott

##### Active Member

- Joined
- Oct 26, 2010

- Messages
- 326

Hello,

I have a simple formula, p = (a+b)^n - b^n, but need to find n in terms of a, b and p. Problem is there isn't an exact algebraic solution (at least not according to WolframAlpha), so I need to create a fully automatic user defined function (UDF) that effectively acts a bit like goal seeker or solver, but without using a macro (Sub) as that has disadvantages like changing cells and blocking undo, etc.

Is there a generic UDF to solve or "invert" any given formula?

This would be such an incredibly useful function, so I can't imagine it hasn't been done, but all I can find are goal seek macros, which is not what I want.

Thanks,

Kelvin

I have a simple formula, p = (a+b)^n - b^n, but need to find n in terms of a, b and p. Problem is there isn't an exact algebraic solution (at least not according to WolframAlpha), so I need to create a fully automatic user defined function (UDF) that effectively acts a bit like goal seeker or solver, but without using a macro (Sub) as that has disadvantages like changing cells and blocking undo, etc.

Is there a generic UDF to solve or "invert" any given formula?

This would be such an incredibly useful function, so I can't imagine it hasn't been done, but all I can find are goal seek macros, which is not what I want.

Thanks,

Kelvin

Last edited: