Here is how to do it:
Suppose the linear model is of the form y=b1x1+b2x2+b3x3,
subject to b1+b2+b3=1.
We have to do is simply re-express b3 as b3=1−b1−b2,
which is to say you are trying to build a model of the form
So create new variables y`=y-x3, x1`=x1−x3, and x2`=x2−x3, and perform the normal linear regression using these transformed variables as the independent variables.
Note that: In excel there is build in function called ‘solver’ which appears that it can be used by maximizing R^2 value and setting the constraints b1+b2+b3=1, but this wont work. The solver is good for solving ‘linear programming’ and not regression type of questions.