Forum Discussion
rflesch
Dec 30, 2024Copper Contributor
User-Defined Fit Functions
Hello,
there are several predefined data fit functions in Excel, such as a polynomial fit – I thinks a data fit is called a "trend line" in Excel.
I have the following question:
Is there a way to *define* custom fit functions, and make Excel to use those instead of the built-in ones? Is there an "add-in" or something I could use?
Any help would be greatly appreciated.
Thanks very much,
rflesch
- Patrick2788Silver Contributor
Yes, you can define new functions with Lambda. All we need is the algorithim or methodology and we're off.
If you know the mathematical algorithm you want to use. you might create a custom VBA function or procedure in the Visual Basic Editor. Details depend on what you want.
- rfleschCopper Contributor
Thank you – I am interested in functions such as, for example,
y = y_0 * (1 – exp(–k*x)) + const.
Is there a tutorial available about how to get Excel to use such a function as a fit function?
Best Regards
rflesch