Use of VBA in Excel for Least Square Method

Hi,
I am an engineer and I have to do a lot of experiments. Usually, I need a way to fit my measurement results with a curve.
I need a way to fit the data to an equation by using least square method.
I know there is an option in Excel called "VBA" to do it in a very smart way. But I really don't know how doing it exactly.
Can anyone help me?
Thanks.
