It's not too hard with Solver.
See attached for an implementation of that.
I've set it up so that you input your desired values in the TARGET, and then run a Macro bound to the button to the right of the table. Make sure Solver is loaded or else it will throw an error like "Sub is not defined" when you click the button.
(The weight of the two variables might not be what you want; I just averaged them instead of summing them, which isn't really how Least Squares is supposed to work. You might want to change D24 from =AVERAGE(B24:C24) to =SUM(B24:C24) or maybe =(B24 *10 + C24) or something like that.
Bookmarks