You are learning Data Analysis and Visualization in MS Excel
How do I create data tables for what-if analysis (scenario planning)?
Here's how to create data tables for what-if analysis (scenario planning) in Excel:
1. Prepare your Formula and Data:
* Ensure you have a formula in a cell that calculates the outcome based on one or two input variables.
* Identify the cells containing the input variables you want to test different scenarios for.
2. Access the Data Table Tool:
* Go to the "Data" tab on the Excel Ribbon.
* In the "Data Tools" group (or "Forecast" group in some Excel versions), click "Data Table."
3. Set Up the Data Table:
* Table range: Select the range of cells where you want the data table results to be displayed. This will typically be a blank area next to your formula result.
* Row input cell: Click the icon next to this field and select the cell containing the first input variable you want to test different values for.
* Column input cell (Optional): If your formula has two input variables, click the icon next to this field and select the cell containing the second input variable.
4. Input Your Scenario Values:
* Row input: Enter the range of values you want to test for the first input variable. You can type these values directly into the cells below the "Row input cell" or reference a separate range containing your scenarios.
* Column input (Optional): If using two variables, enter the range of values you want to test for the second input variable below the "Column input cell" or reference a separate range.
5. OK and See the Results:
* Click "OK" to generate the data table. Excel will automatically populate the selected range with the results based on all possible combinations of the input values you provided.
Example:
Imagine you have a formula in cell `E2` that calculates profit based on unit price (`B2`) and quantity (`C2`). You want to see the profit under different price scenarios.
1. Prepare your formula (`E2`) and data (`B2` and `C2`).
2. Go to Data > Data Table.
3. Set the table range (e.g., `F3:H5`).
4. Set `B2` as the row input cell.
5. Enter your price scenarios in the row below `B2` (e.g., `$10`, `$12`, `$14`).
6. Click OK.
Excel will calculate the profit for each price scenario in the data table (`F3:H5`), allowing you to see the impact of price changes on your profit.
Tips:
* Use clear and descriptive labels for your input variables and scenario values for better understanding.
* You can format the data table cells with appropriate number formatting for readability.
* Data tables can handle one or two input variables. For more complex scenarios, consider using Goal Seek or Scenario Manager tools.