So I'm trying to do some Gaussian peak fitting in excel. My real data has multiple peaks and some background, all of which I want to fit separately. I already know of to do this in an inelegant manner: I write the function in one column, and then take the difference squared in another column and then choose by hand the range in which to sum by editing a formula directly and then call the solver to do the dirty.
I want a better way to do this. It can be done more elegantly if the sum of the differences squared between two columns could be computed in a single cell without creating a superfluous intermediate column (i.e. the difference squared column). I want to write a formula that looks like:
=SumDiffSq("Range1", "Range2")
That returns the difference squared between each element in range 1 and range 2 summed together. I'm relatively certain a person smarter than myself could do this using the built in excel functions, but I'm not seeing how to do it. Thoughts?
Addendum: I've attached an excel file that contains representative data I'm trying to fit (It's x-ray scattering data for a nanocrystaline CdSe thin film if you're curious).
Bookmarks