How to Solve 2 Equations with 2 Unknowns in Excel (2 Examples)

Get FREE Advanced Excel Exercises with Solutions!

Excel is a powerful tool and is very renowned for data analysis and solving large calculations. In several mathematics problems and calculations, we need to solve 2 equations with 2 unknowns. Excel is very handy to use in this regard. If you are looking for ways to do this, you have landed in the perfect place. In this article, I will show you two effective methods to solve 2 equations with 2 unknowns in Excel.


How to Solve 2 Equations with 2 Unknowns in Excel: 2 Examples

Say, you have 2 equations with 2 unknowns x and y. The equations are as follows:

2x + y = 8

3x – 2y = 5

Now, you can follow any of the two methods given below to solve these equations.

Dataset to Solve 2 Equations with 2 Unknowns in Excel


1. Combine MMULT and MINVERSE Functions

The most effective and quickest method for solving two equations with 2 unknowns is to combine the MMULT and MINVERSE functions. Follow the steps below to do this.

📌 Steps:

  • First and foremost, select the D13 and D14 cells.

Select Cells to Solve 2 Equations with 2 Unknowns in Excel

  • Following, insert the formula below to solve the equations.
=MMULT(MINVERSE(B8:C9),E8:E9)
  • Subsequently, press Ctrl + Shift + Enter to get your desired result.

Combine MMULT and MINVERSE Functions to Solve 2 Equations with 2 Unknowns in Excel

Thus, your equations with two unknowns will be solved, and you will get the solutions in D13 and D14 cells. For example, the output should look like this.

Solved 2 Equations with 2 Unknowns in Excel

Note:

Here, you must press Ctrl + Shift + Enter to get your desired result. Because it is an array formula. If you press Enter only, the formula won’t work properly, and you won’t get your proper result.

Read More: How to Solve Polynomial Equation in Excel


2. Using Solver Add-In in Excel

Another smart way to solve 2 equations with 2 unknowns is to use the Excel Solver add-in. Go through the steps below to accomplish this.

📌 Step 1: Installing Solver Add-In

  • Generally, Solver doesn’t remain in any tab initially. Rather, you need to add it from the Excel add-in section.
  • In order to do this, first, you need to go to the File tab.

Access the File Tab

  • Afterward, choose the Options option from the expanded File tab.

Choose the Options Option

  • At this time, the Excel Options window will appear.
  • Now, go to the Add-ins tab from the window >> select the Solver Add-in option >> click on the Go… button.

Excel Options Window

  • As a result, the Add-ins window will appear now.
  • Following, tick the Solver Add-in option from the window and click on the OK button.

Add-ins Window

Thus, the Solver tool will be added to the Data tab.

Solver Tool to Solve 2 Equations with 2 Unknowns in Excel


📌 Step 2: Preparing the Dataset in Proper Format to Solve Functions

Now for calculating using the Solver tool, at first you will need to assume the unknowns’ values and calculate the functions’ values.

  • To do this, we set the X and Y values as 1 and 1. As a result, the values of the functions would be 3 and 1 respectively. But the required values are 8 and 5.
  • Now, record these assumed values calculated function values, and required values of the functions in the Excel file.

Prepared Dataset


📌 Step 3: Using Solver to Get Results

Now, you can finally get the values of the two unknowns.

  • Initially, go to the Data tab >> Solver tool.

Solver Tool to Solve 2 Equations with 2 Unknowns in Excel

  • As a result, the Solver Parameters window will appear.
  • Now, at the Set Objective: text box, refer to cell C12.
  • Afterward, At the To: options list put the radio button on the Value Of: option and write 8 in the text box beside this option.
  • Following, at the By Changing Variable Cells: text box, refer to C8:C9 cells.
  • Subsequently, for setting the constraints, click on the Add button at the Subject to the Constraints: group.

Solver Parameters Window

  • Consequently, the Add constraint dialogue box will appear.
  • At the Cell Reference text box, refer to the C12 cell.
  • Following, choose equal sign (=) from the dropdown list and refer to the D12 cell in the Constraint: text box.
  • Last but not least, click on the OK button.

Add Constraint Window

  • Repeat the previous 5 steps to add another equation’s constraint.
  • Afterward, the Solver Parameters window will look like the following.
  • Here, choose the Simplex LP option from the Select a Solving Method: options.
  • Subsequently, click on the Solve button.

Solve 2 Equations with 2 Unknowns in Excel using the Solver Tool

  • As a result, the Solver Results window will appear informing you that it found a solution.
  • Here, put the radio button on the Keep Solver Solution option and click on the OK button.

Solver Results Window

Consequently, your equations with 2 unknowns will be solved, and the following results will be shown in the C8:C9 cells. For instance, the result would look like this.

Solved 2 Equations with 2 Unknowns in Excel

Read More: How to Solve an Equation for X When Y is Given in Excel 


Download Practice Workbook

You can download our practice workbook from here for free!


Conclusion

To conclude, in this article, I have shown you 2 effective methods to solve two equations with two unknowns in Excel. I suggest you read the full article carefully and apply the knowledge to your needs. You can also download our free workbook to practice. I hope you find this article helpful and informative. If you have any further queries or recommendations, please feel free to comment here.


Related Articles


<< Go Back to Excel Solve Equation | Excel Solver Examples | Solver in Excel | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Tanjim Reza
Tanjim Reza

Md. Tanjim Reza Tanim, a BUET graduate in Naval Architecture & Marine Engineering, contributed over one and a half years to the ExcelDemy project. As an Excel & VBA Content Developer, he authored 100+ articles and, as Team Leader, reviewed 150+ articles. Tanim, leading research, ensures top-notch content on MS Excel features, formulas, solutions, tips, and tricks. His expertise spans Microsoft Office Suites, Automating Finance Templates, VBA, Python, and Developing Excel Applications, showcasing a multifaceted commitment to the... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo