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.

- Secondly, select
**Options**like the following image.

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

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

- 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.

- 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.

- Now, go to the
**Data**tab and click on the**SolverÂ**feature.

- 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.

### 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.

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.

- Second, simplify the equation manually and type the simplified equation in the
**C7Â**cell.

- 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.

## 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.