How to Solve an Equation for X When Y is Given in Excel (2 Suitable Ways)

Sometimes we have to solve an equation for X when Y is given. We can easily solve this problem using Microsoft Excel. We can perform any kind of mathematical operation in Excel. This tutorial will teach you how to solve an equation for X when Y is given in Excel in 3 suitable ways. Let’s get started!


How to Solve an Equation for X When Y is Given in Excel: 2 Suitable Ways

We can solve an equation for X in 2 suitable ways. One is by using the Solver feature and the other is by solving manually. In this article, we will see the detailed steps for both methods.


1. Use of Solver Feature

This method allows us to solve an equation in Excel automatically for X when Y is given. For this, we have to use the Solver feature of Excel under the Data tab. But it’s not available to the ribbon by default. First, we have to add this feature to our ribbon. Then we will use this feature to solve our equation. Follow the steps below to solve an equation using the Solver feature.

Steps:

  • Firstly, go to the File tab.

Use of Solver Feature to Solve an Equation for X When Y is Given in Excel

  • Secondly, select Options like the following image.

  • Thirdly, select Add-ins and click on Go like the below one.

Adding Solver Feature on the Ribbon to Solve an Equation for X When Y is Given in Excel

  • After that, check the Solver Add-in and click OK.

Adding Solver Feature on the ribbon to Solve an Equation for X When Y is Given in Excel

  • As a result, if you go to the Data tab, you will see the Solver feature is now present like the below one.

  • Now, we will solve our equation using the Solver feature. For example, we have taken the equation Y=2X+7, and the Y value for this equation is 5. We have to solve the X value for this equation.

Use of Solver Feature to Solve an Equation for X When Y is Given in Excel

  • To begin with, select cell D5 type the following formula, and press Enter:
=2*B5+7

Here, we have typed the equation as a formula in this cell. B5 represents the cell where Excel will calculate the X value.

Using Formula to Solve an Equation for X When Y is Given in Excel

  • Now, go to the Data tab and click on the Solver feature.

Use of Solver Feature to Solve an Equation for X When Y is Given in Excel

  • As a result, the Solver Parameters dialog box will open like the following image.
  • Afterward, select cell $D$5 in the Set Objective field and assign the value 5 under the Value of option for cell $D$5 because we have taken 5 for the Y value in this example.
  • Next, select cell $B$5 in the By Changing Variable Cells field because we will solve the value of X in this cell.
  • Subsequently, uncheck the Make Unconstrained Variables Non-Negative. By default, this option stays active.
  • After that, click Solve.

  • Consequently, a Solver Results dialog box will open like the image below.
  • Hence, click OK to Keep Solver Solution.

  • Finally, you will see the solved value of X in the B5 cell for your equation for the given Y value.

  • Similarly, you can solve the X value for this equation for different values of Y like the following image.

Use of Solver Feature to Solve an Equation for X When Y is Given in Excel

Read More: How to Solve Algebraic Equations with Multiple Variables


2. Manual Solution

We can also solve an equation in Excel manually. We will use an Excel formula for the calculation part. Every equation will have different types of calculations based on the equation. We have taken the same equation and Y value as before for this example.

Manually Solving an Equation for X When Y is Given in Excel

Follow the steps below to solve an equation manually.

Steps:

  • First, select cell C6 and type the equation inserting the Y value into it like in the image below.

Typing Equation to Solve an Equation for X When Y is Given in Excel

  • Second, simplify the equation manually and type the simplified equation in the C7 cell.

Simplifying to Solve an Equation for X When Y is Given in Excel

  • Afterward, select cell C8 and type the following formula based on the simplified equation:
=(5-7)/2
  • Finally, press Enter, and it will calculate the X value for the equation for the given Y value as shown below.

Using Formula to Solve an Equation for X When Y is Given in Excel

Read More: How to Solve 2 Equations with 2 Unknowns in Excel


Things to Remember

  • Using the Solver feature to solve an equation is the quickest way to perform such tasks as it is an automatic feature.
  • A manual solution of an equation gives you more freedom to perform the calculation in your own way. However, it is more time-consuming than using the Solver feature.

Download Practice Workbook

You can download the Excel workbook from here.


Conclusion

Hence, follow the above-described steps. Thus, you can easily learn how to solve an equation for X when Y is given in Excel. I hope this will be helpful.


Related Articles


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

Get FREE Advanced Excel Exercises with Solutions!
Md. Asaduzzaman
Md. Asaduzzaman

Hello! I am Md. Asaduzzaman. Currently, I am working as an Excel and VBA Content Developer and I will be posting my articles related to this here. I graduated from Bangladesh University of Science and Technology(BUET) in 2022. I completed my BSc in Naval Architecture and Marine Engineering. I like to solve real-life problems in Microsoft Excel and share the solutions through articles. I post here regularly. Hope you find the articles helpful.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo