excelmathmatrixlinear-equation

How can I solve a system of linear equations in Excel?


I have a system of 22 linear equations (exactly 22 equations and 22 unknowns) which are dynamically generated in an Excel spreadsheet. Is there a way to have Excel solve the system and produce a value for each of the unknown variables?

Another SO question has a lot of good information about the algorithms used to solve such equations. Cramer's rule in particular looks promising, but I'm not sure how to implement it in Excel.

Any help is appreciated!


Solution

  • The Excel LINEST function should do it - and will return better results than MMULT(MINVERSE(...)...) in many cases.

    You might also find the LOGEST, GROWTH and TREND functions useful.