In Excel, we often need to solve equations for x, which is the root of the equation. Finding the root of an equation can be quite simple for linear equations. But as you try to find the roots of a quadratic equation, cubic equation, or equations with higher degrees of x, it becomes more difficult and, in some cases, almost impossible. However, Excel is here to save you from all of these problems. Excel makes it quite simple for us to solve equations for x. In this article, we will learn 2 simple yet efficient ways to solve for x in Excel.
The following dataset has 4 equations, each of which successively increases the power of x. Our goal is to find the value of x in these equations.
Not to mention that we have used Microsoft Excel 365 version for this article, you can use any other version according to your convenience.
1. Using Goal Seek Feature to Solve for x in Excel
Using the Goal Seek feature, a tool of the What-If Analysis, is one of the easiest ways to solve for x in Excel. It searches for a specified value of a cell by changing the value of one cell. In this case, the Goal Seek feature will try to find for which the value of x, the value of the equation, becomes 0. Let’s follow the steps mentioned below to do this.
- Firstly, enter the following formula in cell C5.
Here, cell D5 refers to the cell of X Value column.
- Following that, press ENTER.
Note: Here, we will be using the cells in Column D as our initial x value. As, in the beginning, there are no values in those cells, the initial x values will be 0 for all the cases.
As a result, you will see the following output in cell C5, as marked in the following image.
- Now, enter the following formula in cell C6 to find the F(x) Value for the second equation.
Here, cell D6 represents the cell of X Value column.
- Next, hit ENTER.
Consequently, you will get the F(x) Value for the second equation.
- Following the same process, you can find the F(x) Values for the rest of the equations.
♦ Step 02: Choose Goal Seek Feature
- Firstly, go to the Data tab from Ribbon.
- Following that, select the What-If Analysis option.
- Now, choose the Goal Seek option from the drop-down.
Subsequently, the Goal Seek dialogue box will open as shown in the following image.
- Now, click on the box of Set cell and select cell C5 as marked in the image given below.
- After that, enter 0 in the To Value box
- Following that, click on the By changing cell box and choose cell D5.
- Then, click on OK.
Subsequently, the Goal Seek Status dialogue box will be visible and confirm that it has found a solution.
- Finally, click OK.
As a result, you will get the x Value for the first equation as demonstrated in the following picture.
- Now, by following the same procedure, you will get the rest of the x Values for other equations.
2. Applying Solver Add-in to Solve for x in Excel
Utilizing the Solver Add-in option of Excel is another efficient way to solve an equation for x. By default, the Solver Add-in feature is not enabled. Let’s use the steps to solve an equation for x in Excel.
♦ Step 01: Enable the Solver Add-in
- Firstly, use the keyboard shortcut ALT + F + T to open the Excel Options dialogue box from your worksheet.
- After that, go to the Add-ins tab from the Excel Options dialogue box.
- Then, click on the Go option as marked in the following image.
- Next, check the box Solver Add-in option.
- Afterward, click OK.
- Following that, go to the Data tab and you will see that the Solver option is added to the Analyze group.
♦ Step 02: Formulate the Equation to find F(x) Value
- Use the procedure mentioned in Step 01 of the first method to get the F(x) Values for the equations.
♦ Step 03: Utilizing the Solver Add-in Option
- Firstly, go to the Data tab from Ribbon.
- Next, choose the Analyze option.
- Then, select the Solver option from the drop-down.
As a result, the Solver Parameters dialogue box will open on your worksheet as shown in the following picture.
- After that, click on the marked option like in the following image.
- Subsequently, choose cell C5 under column F(x) Value.
- Now, in the Solver Parameters dialogue box, choose the Value of option and enter 0 in the marked box.
- After that, click on the marked option in the following picture.
- After that, select cell D7 and click on the marked region of the following image.
- Following that, click on Solve.
Consequently, Excel will give confirmation that the solver has found a solution.
- Finally, click on OK from the Solver Results dialogue box.
As a result, you will find the x Value for the first equation.
Note: Here, the F(x) Value in cell C5 represents that the value is close to 0.
- Next, by using the same steps, you can get the x Values for the remaining equations.
In the Excel Workbook, we have provided a Practice Section on the right side of the worksheet. Please practice it by yourself.
Download Practice Workbook
That’s all about today’s session. I strongly believe that this article was able to guide you to solve for x in Excel. Please feel free to leave a comment if you have any queries or recommendations for improving the article’s quality. To learn more about Excel, you can visit our website, ExcelDemy. Happy learning!