0% found this document useful (0 votes)
11 views51 pages

Goal Seek and Data Tables, Others

The document provides an overview of data analytics tools in Excel, focusing on Goal Seek and Data Tables. Goal Seek helps determine the input needed to achieve a specific result, while Data Tables allow for scenario analysis by varying one or two inputs. Additionally, it covers other features like Scenario Manager, Data Validation, Pivot Tables, and Macros for enhancing data analysis and automation.

Uploaded by

subhajit.gowebs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views51 pages

Goal Seek and Data Tables, Others

The document provides an overview of data analytics tools in Excel, focusing on Goal Seek and Data Tables. Goal Seek helps determine the input needed to achieve a specific result, while Data Tables allow for scenario analysis by varying one or two inputs. Additionally, it covers other features like Scenario Manager, Data Validation, Pivot Tables, and Macros for enhancing data analysis and automation.

Uploaded by

subhajit.gowebs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

Working with data Analytics

Introduction to Goal Seek & Data


Tables

• Goal Seek: Helps find the input needed to


achieve a specific result or target.

• Data Tables: Allow users to analyze multiple


outcomes by changing one or two variables.
What is Goal Seek?
Goal Seek feature in Excel helps you find the input value needed to achieve a
specific result in a formula. For example, if you know the desired outcome but are
unsure of the input required, Goal Seek will adjust the input automatically to give
you the correct result.

So, in brief,
• Goal Seek is used to determine the required input value to reach a
specific target.
• It works by adjusting one cell to achieve the desired outcome in another
cell.
• Goal seek commonly used in financial analysis, break-even analysis,
forecasting, calculate loan payments or interest rates, What-if analysis.
Goal Seek Example: Sales Target
Let’s take an example,
You have a sales formula:
Total Revenue = Units Sold × Price per Unit

If the price per unit is $30 and you want to achieve a total revenue of $10,000, how
can you use Goal Seek in Excel to determine the required number of units to be sold?

To solve this questions, we will follow some steps:


1. Set up your data in Excel:
2. Use Goal Seek to find required Units Sold for $10,000 revenue, to do so, we will follow:
i. Go to the Data tab → Click What-If Analysis → Goal Seek

ii. In the Set Cell box, select


the Total Revenue cell (B6)
ii. In the Set Cell box, select the
Total Revenue cell (B6)

iii. In the To Value box, enter


10000 (desired revenue)
iv. In the By Changing Cell
box, select Units Sold cell
(B5)

v. Click OK.
After clicking ok we can see that, Excel will calculate and display the required number of
units to be sold. Using simple math, that is:

Units Sold = Total Revenue 10000


= = 333.3333
Price per Unit 30

Hence, we can say that, to achieve a revenue of $10,000, you need to sell around
334 units.

Here, we saw some measurements to adjusting an input value that are used while working
on GOAL SEEK. Those are,

• Set Cell: The cell that contains the formula or the result you want to reach.

• To Value: The target value you want to achieve in the formula.

• By Changing Cell: The input cell that Goal Seek will adjust to reach the target value.
What are Data Tables?
• Data Tables help analyze multiple scenarios by varying one or two inputs.
• It is a tool present in Microsoft Excel as one of the three What-If Analysis
tools namely Scenario Manager, Goal Seek, and Data Table. It is a tool, that
allows one to try out various input values for the formulas present in their
sheet and see how changes in those values affect the output in the cells.
• They are useful in financial models, loan calculations, and sales forecasting.
• Types:
- One-variable Data Table: Changes one input.
- Two-variable Data Table: Changes two inputs.

 To apply a data table tool anywhere in the Excel sheet, there must be a table and
the formula whose values will be replaced by the row and column values must
be kept in the top-left corner or the top-right corner of the table according to
the variables used to replace the formula
For example, there is an Excel sheet that is used to calculate simple
interest over a given amount for a given number of years for a given rate
of interest per annum. With the help of a Data Table, we can calculate the
interest for the same amount with different numbers of years and
with different rates of interest. Not only that, we can also, calculate the
interest for different amounts, for different numbers of years for a fixed
rate of interest very easily.
First of all, we will see the One-Variable Data Table, where only one of the formula
values is replaced with the row or column values of a table of data.

Let’s take an example of Loan EMI Calculation

The EMI formula is:

Where:
P = Loan Amount
r = Interest Rate (monthly) → (Annual Rate / 12)
n = Loan Tenure (in months)
Excel provides a built-in function to calculate EMI:

Where:
rate = Interest Rate per month (Annual Rate / 12)
nper = Loan tenure in months
pv = Principal amount (Loan amount)
One-Variable Data Table Example
We will analyze how different interest rates affect the EMI while
keeping loan amount and tenure constant.

EMI =PMT(Interest Rate, Loan Term, Loan Amount)


Step 1: Set Up the Data

The EMI formula in B19 calculates the monthly payment based on interest rate, tenure,
and loan amount.
The PMT function uses:

• B18/12: converts annual interest to monthly.


• B17 : loan tenure in months.
• -B16 : Negative loan amount because Excel assumes outgoing payments are negative.
Step 2: Create the Data Table:
a. Enter different interest rates in Column D (e.g., 5%, 6%, 7%, 8%, 9%).

b. Reference the EMI Formula


In E15, enter the reference formula for EMI: =B19
c. Select the range D15:E21 (including headers)
To use data table,

d. Go to "Data" Tab → What-If Analysis → Data Table.

e. In the Data Table window:

•Column Input Cell → Select B18 (Interest Rate).


•Leave the Row Input Cell blank (since we're using only one variable).
•And Click OK.
Two-Variable Data Table Example
Example: Finding EMI based on different Loan Tenure & Interest Rates.

NOTE: Data Table analyze how changing one or two inputs in a formula affects the
results. They are useful for sensitivity analysis.
Set up the data by adding loan tenure
Loan Tenure
Data Tables (Months)
Interest Rate
A B ₹ 10,138.20
36 48 60 72
Loan Amount 5,00,000 10,138..20 #VALUE!
14985.44855 11514.64679 9435.616822 8052.466
Loan Tenure (months) 60 5% ₹ 9,435.62
15210.96873 11742.51452 9666.400765 8286.444
Interest Rate (Annual) 8% 6% 9666.400765
16133.5936 12681.29172 10623.52236 9262.919
EMI ₹ 10,138.20 7% 9900.59927
15899.86633 12442.52119 10379.17761 9012.769
8% 10138.19714
14321.28937 10847.56182 8763.880027 7375.221
9%
10379.17761 14985.44855 11514.64679 9435.616822 8052.466

Enter the EMI Formula. Here we are going to find the Loan Tenure, for that the formula
will be: =PMT(B18/12, B17, -B16)

Where,
B16 = Loan Amount, B17 = Loan Tenure, B18 = Interest Rate
Select the table range (including Interest Rate & Tenure values).
Go to What if analysis from Forecast group and click on Data Table

In the Data Table dialog box select $B$16 ( Loan Tenure) as a row input cell
In the Data Table dialog box select $B$16 ( Interest Rate (Annual)) as a column input cell

Click ok. We can see and compare, how loan amount is impacted on different interest
rate and different times to pay the Emi
Scenario Manager
Scenario Manager allows users to create and compare multiple sets of input values to see
how changes affect the outcome of a model.
 It is a feature under What-If Analysis in Excel that allows you to create and compare
multiple "what-if" situations (called scenarios) based on different sets of inputs.

 It’s like asking: "What will happen if I change these values?“

 You can use it to test best case, worst case, or expected case results for things like
budgets, profits, forecasts, etc., without changing your actual data each time.

QUESTION: A business wants to forecast its potential profit under different situations using
Excel. The profit is calculated as Profit = Sales – Cost. The company considers the following
scenarios:
• Best Case: Sales = ₹100,000, Cost = ₹30,000
• Worst Case: Sales = ₹60,000, Cost = ₹50,000
• Expected Case: Sales = ₹80,000, Cost = ₹40,000
Explain how to use the Scenario Manager feature in Excel to create and compare these
scenarios. Also, provide the calculated profit in each case.
To compare profit under various conditions without manually changing the values each
time, we will follow some steps:

Step 1: Set up your worksheet

Step 2: Go to the Data tab → click What-If Analysis → choose Scenario Manager.
Click Add to create your first scenario.

Step 3: Add Scenarios: Now we will start to add our first Scenario

Scenario 1: Best Case


• Name: Best Case
• Changing Cells: B1 (Sales) and B2 (Cost)
• Input Values: ₹150000 (Sales), ₹80000 (Cost)

Scenario 2: Worst Case


•Name: Worst Case
•Changing Cells: same
•Input Values: ₹80000 (Sales), ₹70000 (Cost)

Scenario 3: Expected Case


•Name: Expected Case
•Changing Cells: same
•Input Values: ₹120000 (Sales), ₹40000 (Cost)
Step 4: After adding all scenarios, click on Show for each to view how the values in your
sheet change. And the click on Summary Button. It will display each cases with details
explanation.
Data Validation
Data validation in Excel is a feature that allows you to control the type of data entered into a
cell. It helps maintain accuracy and consistency by setting rules for what can be input. For
example, you can restrict entries to whole numbers, decimals, dates, or a predefined list.

What Is the Purpose for Using Data Validation in Excel?


• stops us from entering incorrect data in cells.
• Keeps our data uniformly formatted.
• Simplifies and speeds up our data input.
• Enhances our overall data reliability.
• Creates a positive user experience.
• Allows custom rules using formulas for our unique requirements.

For example:
•Allow only numbers between 1 and 100
•Create a drop-down list for predefined options
•Block duplicate entries or invalid dates
To Apply Data Validation:

Select the cell or range you want to apply it to (e.g., A2:A10).

Go to the Data tab → Click on Data Validation.


In the Settings tab, choose: Whole number, Decimal, List, Date, etc.

Add conditions (e.g., "between 1 and 100")

Add an Input Message or Error Alert to guide the user. (Optional)


After clicking OK, we got the given output
Pivot Table
Pivot tables are one of the most powerful features in Excel, allowing you to quickly
summarize, analyze, and visualize large sets of data. Whether you’re dealing with sales data,
financial reports, or any other type of complex dataset, knowing how to create pivot tables
in Excel can make your data analysis much more efficient and insightful.

Creating a Pivot Table


Step 1: Set up your data (Organize in a Tabular Format, Avoid Blank Rows or Columns)
Step 2: Select your data click anywhere within your dataset. Alternatively, highlight the specific
data range you want to use for the pivot table.

Step 3: Go to the Insert tab → Click PivotTable.


Step 3: Go to the Insert tab → Click PivotTable.

Step 4: In the Create PivotTable dialog box


New Worksheet: Creates the pivot table in a new worksheet.
Existing Worksheet: Lets you place it in a specific location on the current sheet.
Step 4: Build Your Pivot Table.
In PivotTable Field List pane
on the right side of your
screen, you can organize your
data.
Step 5: Customize your pivot table as you like or need

 Rows: Sets rows for the table.

 Columns: Creates columns for your data.

 Values: Adds numerical data to be calculated (e.g., sum, count).

 Filters: Adds filters to refine your analysis.


Step 5: Format Your Pivot Table

Apply a PivotTable Style :Design > PivotTable Styles to apply a pre-designed format

Sort and Filter :Use


the dropdown
arrows on row
or column
headers to sort
and filter data
Adjust Column Widths: You can do it Manually drag or use AutoFit.

Customizing a Pivot Table :


• Show Values As: % of Row Total / Column Total, % Difference From, Running Total
In, %Parent total

2
1

3
Group Data
•Right-click on date or number field → Group
• Group dates by month/quarter/year
• Group numeric values into ranges

Step 6: Refresh Your Pivot Table : PivotTable Analyze > Refresh.


What are subtotals in a Pivot Table?
Subtotals in a Pivot Table are summary values that display the total for each
group/category within a field. They help you analyze data group-wise, such as total sales
per region or total marks per student.
To show subtotals in a Pivot Table?
Step 1: Click anywhere inside the Pivot Table. Go to the “PivotTable Analyze” tab (in older
versions, "Options").
Step 2: Click “Field Settings” for the row label you want to subtotal.

You can see 2 options in the dialog box, select:

 “Automatic” (to show default subtotals), or


 “Custom” (to choose specific functions like Sum, Average, Max, etc.)
• Other way you can do it by right clicking on the row field name
• Select “Field Settings”
• Choose subtotals options
To remove or hide subtotals from a Pivot Table, we need to follow some steps :

• Select the row field

• Go to Field Settings

• Choose “None” under


Subtotals

• Click OK

• Another way to hide is,


• Go to Design ->
Subtotals -> Do Not
Show Subtotals
Macros
A macro is a set of instructions or commands that can be recorded and run to automate
repetitive tasks in Excel. It is written in VBA (Visual Basic for Applications).

Why Macros Are Needed Benefits


Automate repetitive tasks Save time & effort
Reduce manual errors Increase accuracy
Handle complex logic Perform tasks not possible manually
Create reports & dashboards Boost productivity
Customize Excel behavior

Prerequisites for Using Excel


Macros
Before learning how to create macros in Excel you have to turn to the
developer mode in Excel.

Step 1: Open MS Excel and Right-click on the Ribbon


Go to the menu and perform a right-click on the ribbon, select Customize the ribbon.
Check the Developer box and Click on OK.
Next is to enable Macros in excel.

To enable macros in Microsoft Excel, follow these steps:

• Click on the File tab in the top-left corner of the


screen.

• And select Options at the bottom of the left-hand


menu.
•In the Excel Options window, select Trust Center from the left-hand pane.

•Click on the Trust Center Settings button on the right side.


In the Trust Center window, click on Macro Settings on
the left.
Choose the Appropriate Option:

you will see several options. Select the one that best
meets your security needs:

Disable all macros without notification: This


option disables all macros and does not show any
warnings.
Disable all macros with notification: Macros are
disabled, but you are alerted with a security
warning when a macro-enabled file is opened.
You can then enable macros manually.
Disable all macros except digitally signed
macros: This option will enable macros only if
they are signed by a trusted publisher.
Enable all macros (not recommended;
potentially dangerous code can run): This option
will enable all macros without any restrictions. Be
cautious when using this setting as it can expose
you to security risks.
How do you record a macro in Excel?

To record a macro:
 Go to the View tab or
Developer tab.
 Click “Record
Macro”.
 Give your macro a name.

 Assign a shortcut key.


 Assign a shortcut key. Here Ctrl+Shift+H

 Choose where to store it (This Workbook,


New Workbook, or Personal Macro
Workbook).

 Click OK and start performing the actions


you want to record.
To Run Macros in excel
There are multiple ways to run macros after creating macros in Excel. Those are :
 Run the Macro by Clicking on a Shape
 Run Macro By Clicking a Button

To Run the Macro by Clicking on a Shape


Step 1: Click on the Insert Tab on the ribbon and Choose any Shape
Step 2: Add the Shape
Step 3: Edit the Shape Step 4: Right Click on the Shape and Click on Assign
Macro
• Right-Click on the shape and a dialog box
would be opened. Then click on Assign Macro.

• After right-clicking on the shape, another


dialog box of Macro would be opened.
Step 5: In the dialog box, select the macro from the list you want to assign to your shape and
click the OK button. Now the shape would work as a button and whenever you click on it, it
will run the assigned macro.

After clicking OK. It will Recorded the


macros. Whenever you click on the
shape (Named as Macro2) you can see
what has been recorded in macro2
To run a macro

• Pressing the assigned shortcut key (In our case it’s Ctrl+shift+H, or
• Going to View > Macros > View Macros, selecting your macro name, and clicking Run

You might also like