DM&DM Using Excel - Reading Material
DM&DM Using Excel - Reading Material
PGDM (TERM I)
STUDY MATERIAL
Readings and Exercises
INSTRUCTORS
Prof. Himanshu Joshi
Prof. Ashish Kumar Rathore
1
TABLE OF CONTENTS
Managing Data (Session 1-2) .......................................................................... 3
PRACTICE EXERCISE - 1 ....................................................................................................................... 4
Data Analysis and Decision Optimization Using Solver (Session 7-8) ............ 17
PRACTICE EXERCISE – 4 .................................................................................................................... 17
2
Managing Data (SESSION 1-2)
LOOKUP Function: Lookup functions help you to “look-up” for values from worksheet ranges.
Excel allows you to perform both vertical Lookup and horizontal Lookup using VLookup and
HLookup functions. Majority of instances where Lookup functions are used employ VLookup
functions.
MATCH Function: Match function returns the location of the occurrence of the given text in
an array. Suppose you have been given the Sales data for products during various months. Use
the sheet named Match to identify the location of Product and Month in the given array.
INDEX Function: Index function returns the value occurring at a specified location in an array.
For example, value at the intersection of a row and column combination.
Note that the two functions INDEX and MATCH are somewhat opposite in their tasks: INDEX
returns a value occurring at a specified location in a specified vector or a matrix, whereas
MATCH returns the location in a vector where a given value occurs.
Pivot Tables: A very powerful tool in excel which helps to summarize data contained in
columns by means of subtotals or other calculations. The default summary is a sum. The other
calculations might be average, count, max, min, percentages, standard deviation etc.
Page Field: Page field operates like the row and column fields but provides a third dimension
to your data.
Discrete variable: This generally takes small number of unique values. E.g. Dept. Name,
Customer Names, Product etc. These variables are best suited for row/column fields, although
they can be used as data fields.
Continuous variable: This generally takes a large number of values. E.g. Units Sold, Revenues,
Profitability etc. These are best suited as data fields.
When you define a pivot table you must identify the row/column and data fields. One can also define
subsidiary or inner rows/columns. A Pivot Table isn’t directly linked to the source data. If you change
3
the source data, you need to refresh using the red exclamation mark on toolbar to update the pivot
table.
PRACTICE EXERCISE - 1
1. Write a formula based to compute tax rates based on income levels given below
0-9999 15%
10,000-29,999 30%
30,000-99,999 34%
2. You have been given the Product ID and the price. Given a product ID, how can you look up
the product price?
3. Suppose the product price changes over time. You have the date when the product was sold.
How can I write a formula to compute product’s price?
4. The sales for the products tea, coffee and sugar have been provided in excel for the first four
months of the year. Use to appropriate function to identify the position of various products
and months in their respective arrays.
5. Problem - Computation of shipping cost: A company supplies its product to four cities from
five warehouses. The shipping plan is given to you in sheet named Index. For example, it is
planned to ship 150 units from warehouse-1 to city-3, as indicated by the third row of this
range. The per unit shipping cost per unit distance is given as 5 monetary units. The distances
between the five warehouses and the four cities are also given. For example, the distance
between warehouse-2 and city-3 is 17 distance units. With this data compute the cost of
shipping the various quantities given above between the warehouses and the cities.
6. Now, suppose rows and columns of the distance matrix are labeled with names of their
respective warehouses and cities; similarly, in the shipping plan, instead of warehouse and
city numbers, the corresponding names are given. In this case, in each transaction, you need
to convert the warehouse and city names to the row and column numbers in which their costs
occur in matrix.
7. Natural Skin Care Company that deals in beauty products manages its sales transaction data
on Excel. Being a Sales Manager of Natural Skin Care, you are responsible for monitoring and
managing sales activities of the company across Cities and Regions. As a Sales Manager you
need to look at the sales transaction data at disaggregated level, at aggregated level, generate
summary reports, MIS reports and may also needs to analyze the trends and take decisions.
While taking decisions, Sales Manager wants flexibility in terms of generation of summary
reports, extracting a set of data, changing the decision criteria every minute and see an impact
on the output. The Sales Manager also wants to perform the multi-dimensional analysis on
4
the sales data to find hidden patterns, for example, which product is in more demand in which
location of which city?
i. Generate the MIS report to show only the salesperson wise, product wise sum of sales
revenue and average of sales revenue.
ii. Drill the sales transaction data for “mascara” sold by “Eshita”.
iii. Find the Total revenue and units sold by Region.
iv. Units sold and revenue for each salesperson
v. Number of sales transactions involving each product.
vi. Largest (transaction in terms of revenue) for each product
vii. Average amount per transaction by region.
viii. The number of sales transaction for each salesperson.
ix. For each salesperson, the total revenue by product.
x. Total revenue generated by each salesperson broken down by location.
xi. Total revenue by salesperson and year.
xii. Select all transactions from South where the sales units are greater than 17
xiii. List all transactions of 2004 sold by Zara and where Revenue is more than 50
xiv. List all transactions in which Jagriti sold lip gloss
xv. List the Ten largest transactions by revenue
xvi. List the Bottom 5% of transactions by revenue in which Chhaya was the Salesperson.
xvii. List all 2005 lipstick transactions in which Aishwarya was the salesperson.
xviii. List all transactions of foundation in first six months of 2005 in which Eshita or Jagriti was the
salesperson and per unit price was more than 3.20.
xix. Find all transactions in which Harshita sold eye liner in the West and city Delhi or Mumbai.
xx. Find all transactions in top 5% with regards to units sold
xxi. Find top 20 revenue generating transactions that involved foundation sales
xxii. Find all transactions involving sales of at least 60 units during 2004 for which the per unit price
is at least 3.10
xxiii. Find all foundation transactions during the first three months of 2004 for which the unit price
was large than 3.05
xxiv. List all transactions in which Zara or Bhumika sold lipstick or foundation in Delhi or Jaipur.
xxv. List all transactions for lipstick sales by Jagriti during 2005 or foundation sales by Zara during
2004 in Pune.
xxvi. Extract only the Names of salesperson
xxvii. Extract unique combination of salesperson, product and region for sales revenue > 200
xxviii. Create a summary report of salesperson wise sales using Pivot
xxix. Create a summary report of salesperson wise and product wise sales
xxx. Find the salesperson wise contribution to total sales
xxxi. Find the salesperson wise contribution (in %age) to product level and total sales
xxxii. Find the product wise sum of revenue and identify which product has the lowest sales.
xxxiii. Drill the summary data for “Lipstick”.
xxxiv. Slice the Product wise sales data to restrict the output
a. for “Bangalore”
b. for “Delhi” and “Bangalore”
xxxv. Drill the output to show all location-wise sales only for “lip gloss”
xxxvi. Remove the Drill-down
5
xxxvii. Dice the output to restrict it to show quarter wise and year wise
xxxviii. Show the report in a graphical format
xxxix. Calculate the unit price for each of the products and identify which product is cheapest and
which is most expensive.
xl. Identify the city for which “Eye Liner” has the least demand.
xli. Identify the city and Region for which “Lip Gloss” is in more demand.
xlii. Identify the sales pattern as per Region and City.
ADDITIONAL EXERCISE - 1
Ex 1: Suppose the price of a product will change at dates in the future as follows:
Date Price
On or before Feb 15, 2004 8
Feb 16, 2004 to on or before April 10, 2005 9
April 11, 2005 to on or before January 15, 2006 10
January 16, 2006 onwards 12
Write an IF formula that computes the price of the product based on the date product is sold.
Ex 2: You have been given the employee ID Codes, Salaries and Years of Experience. Write a Formula
that takes given ID code and yields the employee salary. Write another formula that takes the given
ID code and yields the employee’s years of experience (use lookup function).
Ex 3: You are thinking of advertising Microsoft products on a popular TV music program. You pay one
price for one group of ads, but as you buy more ads, the price per ad drops as described in the
following table. Write a formula (use lookup function) that yields the total cost of purchasing any
number of ads.
Number of Ads Price per Ad
1-5 12000
6-10 11000
11-20 10000
More than 20 9000
Ex 4: In the previous problem suppose, if you buy more ads, the price is determined as follows. If you
buy 8 ads, you pay 12000 for first 5 ads and 11000 for next 3 ads. Similarly, if you buy 14 ads, you pay
12000 for first 5 ads, 11000 for next 5 ads and 10000 for remaining 4 ads. Write a formula (using
lookup function) that yields the total cost of purchasing any number of ads.
Ex 5: The distance between any two cities can be approximated using the formula 69 * sqrt
((difference in latitude) ^ 2 + (difference in longitude) ^2)). The latitude and longitude data of select
cities is given to you. Using lookup function, create a table that gives the distance between any two
cities.
Ex 6 - You have been given annual sales for different products and regions. Can you find any patterns
in the data? What are the regional sales? Find the regional sales for each product? Which variables
define the inner row field and outer row field?
Ex 7 - You have a small travel agency. And you’re about to do a mass mailing of a travel brochure. Your
funds are limited, so you want to mail the brochure to people who spend the most on travel. For a
6
random sample of 925 people, you have the gender, age and amount spent on travel last year. How
can you use this data to determine the following?
Ex 8 - Suppose that you are doing market research about Station Wagons. Your goal is to find what
factors influence the likelihood that a family will purchase a station wagon. For a large sample of
families, you’re given the family size (large or small) and the family income (high or low). Can you
determine how family size and salary influence the likelihood that a family purchases the station
wagon? Here you need to look at how salary affects purchase decision for each family size and how
family size affects purchase decision for each salary level.
Ex 9 – Use the Sales Data of ABC Inc. to analyze sales trends as per the following requirements. The
data is available in Ex 5 sheet.
Ex 10: Use ABC Sales data (in Ex 6 sheet) to perform following tasks
7
1. Filter the data based on following criteria:
a. Authorized Person names ending with “K”.
b. Authorized person names not ending with “N”.
c. Amount is Between 100 and 500.
d. Amount is Less than 100 or greater than 700.
2. Filter the Data Based on Amount >500.
3. Filter the Data which is ordered between dates 9/5/2005 – 10/5/2005.
4. Identify all transactions performed by Kiran for IT department.
5. Identify all transactions performed by either Sumit or Priya for Consulting or Equipment
category in IT or HR department.
6. Identify top 10 transactions where category is either Services or Software.
7. Generate a list of Authorized persons.
8. Identify all those transactions where department is either HR or Production and sales Amount
is greater than average of total sales amount.
9. Sort the data on the following bases:
a. Amount
b. Department and then Category
c. Department -> Category -> Authorized Person
10. Perform Subtotal on the basis of Amount spend for each Department.
11. Enter the following validation for Amount column:
a. It should accept only whole numbers.
b. It should not accept value less than 10 or greater than 8000.
c. It should display input message regarding validation criteria.
d. It should display an error message” Wrong Entry” if user is entering invalid data.
1. Create a copy of sales data in new sheet and name it as “Pivot Table Report”.
2. Create a pivot table displaying the number of products sold for each quarter region wise.
3. Create a Pivot table report for displaying the number of products sold by each employee
region wise.
4. Create a pivot Table report for displaying the total cost of sales of individual item region wise.
5. Create a pivot table displaying the min, max and average quantity sold for each item region
wise.
6. Create a pivot table displaying the top six employees based on the total cost of sales done.
7. Create a pivot table displaying the monthly sales of year 2003 and 2004 for TV and DVD.
8. Create a pivot table displaying the quantity sold for each item region wise and add one column
which will calculate the % of quantity sold for the product to the total for that region.
9. Create a pivot chart displaying the total quantity of all products sold for year 2003 for all
regions.
10. Create pivot chart displaying region wise sales made by each employee for all products.
8
Introduction To Power Pivot (SESSION 3-4)
The Excel Data Model feature provides an easy way to load data beyond the ordinary capabilities of
Office 365 (1,048,576 rows of data) and use this data to create PivotTables. The Data Model also
enables you to combine data that comes from sources outside Excel (including databases like Access
and SQL Server, websites, text files, and so on) with data from Excel. Understanding the Data Model
will make it easier for you to grasp the capabilities of Power Pivot.
Power Pivot is an add-in that enables you to efficiently store and query large volumes of data
(think hundreds of millions of rows) that you can combine from multiple data sources and
multiple data formats. For example, some of your data may come from a Microsoft Access
database, some from a text file, some from several Excel files, and some from live data
imported from a website. Pivot tables and pivot charts can easily be created from hundreds
of millions of rows of data.
Efficiently store and query large volumes of data—as in hundreds of millions of rows of data.
You can combine this data from multiple data sources and multiple data formats. For example,
some of your data could come from a Microsoft Access database, some from a text file, some
from several Excel files, and some from live data imported from a website.
Easily create PivotTables and PivotCharts from hundreds of millions of rows of data.
Create calculated columns (beyond field definitions). For example, if each row of your source
data contains revenues and costs, you could create a calculated column to compute Profit =
Revenue – Costs. Power Pivot contains many Data Analysis Expressions (DAX) functions that
facilitate the creation of calculated columns.
Create calculated fields that aggregate data from different rows. For example, a calculated
field could compute the total profit as the sum of the profit from each transaction.
Create key performance indicators (KPIs) that make it easy for an organization to use
visualizations, which are similar to conditional formatting, to track performance against
targets. For example, a Power Pivot KPI could be used to determine for each year how each
salesperson’s actual sales compared to his or her sales quota.
Use it as a data source for workbook reports (PivotTables, charts, CUBE functions, and so on).
Publish Power Pivot reports in Microsoft SharePoint to allow automatic data refreshes,
facilitate sharing, and enable IT monitoring. When published, a Power Pivot report can be used
as a data source for other analytic and reporting experiences.
9
PRACTICE EXERCISE – 2
1. The file named Faberu.xlsx contains salaries, travel expenses, faculty ID, department code,
and faculty code for all the business-school faculty. Use this data to answer the following
questions.
I. Use the Data Model to create a PivotTable that gives the average salary, broken down
by department.
II. Use the Data Model to create a PivotTable that gives the average salary, broken down
by the type of faculty member and the department.
III. Use the Data Model to create a PivotTable that gives the average travel expenses,
broken down by department.
2. Using the given dataset (Sales Order) in the class, define the KPIs and highlight the same in
your final analysis using PowerPivot.
ADDITIONAL EXERCISE - 2
Ex 1: Using the file named States.xlsx, summarize the total sales in each state by year.
Ex 2: Using the file named Storesales.txt, summarize the total revenue by store, and create a slicer for
the Store field.
Ex 3: Use the Staff Database which stores data about its employees (tbl_employees) and the
department (tbl_department) to which they belong.
Explore the database and use PowerPivot to do the following
Load the table data from the database in Power Pivot. How many tables are there in field
list? Can you select attributes and values from all the tables?
After selecting the two tables, display number of employees in each department
Filter the count of records belonging to Department ID 400
What is the average starting salary for each department?
Display Department name instead of department ID? How do the variables look different
from a Pivot Table?
Analyze the relationship between the two tables using PowerPivot.
Find the maximum salary drawn by employee with respect to Department and Nationality.
Ex 4: Building a Dashboard with PowerPivot - First open the PowerPivot Window, connect to the sales
database and select the sales order header and detail tables, the sales territory table and the product,
product sub category and product category tables.
Now you connect to the Excel data. First step is to copy the sales budget into the blank workbook.
Make the copied list into a table and create a linked table in PowerPivot. Add the table in the
PowerPivot database.
10
Sensitivity Analysis and Its Applications (SESSION 5-6)
Excel provides a range of functions to perform financial related operations. Some of the important
terms are discussed in brief:
Present Value (PV) – returns the present value of an investment based on an interest rate and
constant payment schedule.
Future Value (FV) – returns the future value of an investment based on an interest rate and a
constant schedule.
PMT: returns the payment amount for a loan based on an interest rate and a constant
payment schedule.
PPMT: returns the principal payment for an investment based on an interest rate and a
constant payment schedule.
IPMT: returns the interest payment for an investment based on an interest rate and a
constant payment schedule.
Net Present Value (NPV): returns the net present value of an investment.
Internal Rate of Return (IRR): returns the internal rate of return for a series of cash flows. It’s
the rate of return which makes NPV of a project equal to zero.
Rate Function: returns the periodic interest rate of a loan, given the number of payment
periods, periodic payment amount and the loan amount. For e.g. The annual interest for a 48
month loan for 5000 that has a monthly payment amount of 117.43 is given by the function
as =Rate(48, 117.43,5000)*12
NPer Function returns the number of payment periods for a loan, given the loan amount,
interest rate and periodic payment amount. For e.g. The number of payment period for a 5000
loan that has a monthly payment amount of 117.43 at 6% rate of interest is given by the
function = Nper(0.06/12,117.43,5000)
In this session we will learn how to represent these functions in MS-Excel. Before proceeding further,
let’s first look at the main functions which help in predictive analysis
Goal Seek
Goal Seek enables you to compute a desired value in a cell computed using a formula by changing an
input cell. To use goal seek three pieces of information is required:
2. To value: The numerical value you desire for the set cell.
3. By changing cell: Input cell that excel changes until the set cell calculates the desired value
into value cell.
11
Data Table is a frequently used tool in excel to track how small changes in inputs affect the
results of formulas that are dependent on the input values. For e.g., one might be interested
in knowing how the price change for a product affect the firm’s net income. This type of
analysis is known as what if analysis or sensitivity analysis. Excel has two types of Data Table.
The One-Variable Data Table: allows identification of a single input variable on any number of
formulas
The Two-Variable Data Table: allows identification of two variables on a single formula.
Sensitivity analysis using Data table is useful if you want to see the impact of changes in a
maximum of two variables. If you want to see the impact of changes in more than two input
variables, scenarios are used.
Naming Ranges
Named Ranges are a powerful tool in Excel that allows you to assign a meaningful name to a
single cell or a range of cells. The range of cells can be located anywhere in the workbook.
They can be adjacent cells or nonadjacent cells. When a range of cells that has a name is
selected, the range name appears in the name box. Each range must have a unique name—
the same name cannot be used to reference more than one range in a workbook.
For example, you can assign the name "TaxRate" to cell C1 and then use the name "TaxRate"
anytime you would normally use the cell C1, such as =A5*TaxRate.
PRACTICE EXERCISE - 2
1. You want a housing loan for construction of a house. Estimated construction cost is Rs. 20
lakhs. You can contribute Rs. 4 lakhs from your own savings and remaining you need to get it
financed from a bank @ 8% per annum for 10 years.
2. The monthly installment as per the above conditions is not suitable and does not fit in your
budget. The maximum what you can pay is Rs. 18000 per month. You are ready to increase
the payment period. Find the payment period that fits your budget (assuming all conditions
remain same).
3. But, finance companies offer different conditions for different situations. You want to
evaluate multiple options as per following conditions:
12
ABC Finance 8.75% 7 years
ABC Finance 8.25% 10 years
Sun Finance 9.1% 56 months
Sun Finance 8.7% 80 months
4. Once you finalize the finance plan for a particular period, find how the monthly installment is
going to be adjusted to the loan amount (principal and interest part). Also calculate the total
interest to be paid at the end of the period.
5. How much you save every month to get a maturity amount of Rs. 5 lakh at the end of 5 years
at 7% per annum.
6. Suppose you wanted to save Rs.500,000 before you retire in 10 years. You can earn 4%
interest in an annuity product, but you want to know given that interest rate how much money
you need to put aside monthly to reach your savings goal.
7. How much you save every month to get a maturity amount of Rs. 5 lakh at the end of 5 years
at 7% per annum.
8. You invest Rs. 10,000 per month at an annual interest rate of 8%. Over a fixed period of x
months, you want a return of Rs. 500,000. Find the period needed for an investment to grow
from Rs. 10,000 to Rs. 500,000.
9. If you invest Rs. 8000 today with a financial company and the company pays you Rs. 1000 in
the 1st year, Rs. 1500 in the second year, Rs. 2000 in the 3rd year, Rs. 2500 in the 4th year and
Rs. 3000 in the 5th year at 5% rate. Is this a good investment?
10. For a payment of Rs. 10000, a finance company will pay back Rs. 3000 at the end of next four
years. Whereas bank offers 5% interest rate in its saving bank account. Find out where one
should invest?
11. Two investment options are available to you. In 1st option, on Rs. 1000, of investment, you
will get Rs. 450 at the end of the 1st year, Rs. 325 at the end of 2nd year, Rs. 400 at the end of
3rd year and Rs. 300 at the end of 4th year. Whereas, in the 2nd option, on Rs. 700 of
investment, you will get Rs. 250, Rs. 300, Rs. 500 and Rs. 200 at the end of 1st, 2nd, 3rd and
4th year respectively. Evaluate which scheme offer better returns.
12. Suppose you invest Rs. 400,000 in a fund. The return which you get in the first five years is:
Rs. 92000, Rs. 85000, Rs. 94000, Rs. 92500 and Rs. 90000. Find the rate of return at the end
of two years, four years and five years.
13. On the 10th birthday of Joy, his parents decided to invest Rs. 4000 every year till the 17th
birthday. Return available on this investment is 8% per year. From 18th birthday onwards to
21st birthday they want to withdraw Rs. 20000 every year for Joy’s education. You need to
find whether Rs. 4000 investment every year was sufficient to meet these Joy’s education
expenses after 18th birthday. If it is not, find how much they should have invested every year?
14. Refer to the Sheet 3 Session-3 workbook to do scenario analysis. Change the values of revenue
earned thru consultancy and revenue from sales and the see the effect on the operating
income. Change the values in the consultancy and travel heads under revenue and also change
the value of salary, rent and utilities and see the effect on the operating income. Compare the
two scenarios to take optimal decision.
13
15. Should a pay 11000 today for a photocopier or 3000 a year for 5 years? Assume the cost of
capital is 12% per year.
16. If I invest 2000 a year for 40 years towards my retirement and earn 8% a year on my
investments, how much will I have when I retire?
17. I am borrowing 10,000 on a 10-month loan with an annual interest rate of 8 percent. What
will my monthly payments be? How much principle & interest am I paying each month? What
is total interest I am paying?
18. You have been given the cash flows for Project 1 & 2. Find out the NPV at r=0.2 and r=0.01.
Determine the IRR for the two projects.
19. You have been given the annual fixed cost (45000) and variable cost (4500) for running a
lemonade store. The price for a glass of lemonade is 3. The demand for lemonade is estimated
at 10000 glasses at a unit cost of 0.45. How many glasses of lemonade need to be sold per
year to break even?
20. You are going to buy a new house. The amount of money needed (with a 10 year repayment
period) is 1000,000. The annual interest rate is 8%. Calculate monthly payment for various
interest rates. Calculate what would be the monthly payment for different repayment period.
Calculate monthly payments for different combinations of interest rates and payment period.
11. Find all IRRs for a project having the given cash flows on the listed dates:
ADDITIONAL EXERCISE - 2
Ex 1: You are thinking about starting a pension fund. You plan to deposit 2000 in the fund at the
beginning of each year and you expect the average rate of return to be 9% per year for the entire
term. Assuming you are now 30 years old, how much money will your account accumulate by the time
you are 65?
Now assume that you started the pension fund 3 years earlier and have already accumulated 7500 in
your account. How much money will your account accumulate at the end of the 35 years?
Ex 2: You are presented with an investment opportunity that returns 1000 each year over the next
five years. To receive this annuity, you must invest 4000. Are you willing to pay 4000 today to earn
14
5000 over the next five years? The rate of interest is 4.5%. If you are offered a lump sum of 5000 at
the end on the 5 year period instead of each year, would the investment still be attractive?
Ex 3: You have been asked to organize a conference. The fixed costs are 15000, and you need to pay
the college union 300 per participant as food and lodging cost. You have invited 10 speakers and they
need to be paid 700 per head. You are charging 900 per participant who is not a speaker as conference
fee including food and lodging. How many paid registration are needed for you to break even?
Ex 4: We want to pay off the mortgage in 15 years. The annual rate of interest is 6 percent. The bank
has told us we can afford monthly payments of 2000 only. How much can we borrow?
Ex 5: The monthly income statement for ABC Co. is given to you for analysis. Total revenue, total
expenses (fixed + variable) and total operating income has been calculated in different cells. You have
been asked to show the effect on Revenue, Expenses and Income if units sold varies from 800 to 1500
by 100.
Ex 6: XerTech Copy Inc. is running a photocopying business and has leased 40 photocopy machines for
its use. The average monthly expense details for each machine is given. The monthly net income is
calculated for you. You want to maximize the net income and wonder how copy volumes affect Net
Income. You change the copy volume figure from 30,000 to 45,000 and the Net Income changes to
$16,600. But what if you want to see the effect on Net Income for many different values for
Copy/Month/Copier volume (say from 24,000 to 44,000 in multiples of 2000)
You observe that the values for Revenue, Cost of Goods Sold, Contribution Margin, and General and
Admin. Costs change each time you change the value for copy volumes. Can you track how sensitive
each one of these values is to copy volume?
There are some key value combinations you particularly want to highlight to the management. In case
where Copies/Month/Copier is 30,000, the scenario is expected demand. For copy volumes equal to
5000, the scenario is low demand and 50000 is very high demand.
Now you want to track the effect of both copy volume and price charged per copy on Net Income.
Take price charged per copy in multiples of 0.05.
Ex 7a: Your business has a modest sale of Rs.25,000. You've set yourself a new sales goal of Rs.35, 000.
At the moment, you're selling 1000 items at 25 each. Assume that you'll still sell 1000 items. To achieve
new sales figure of Rs.35, 000, by how much do you have to raise your prices?
Ex 7b: You've had a meeting with your staff, and it has been decide that a price change from 25 to 35
is not a good idea. A better idea is to sell more items. You still want a sale of Rs.35 000. Use Goal Seek
to find out how many items you'll have to sell to meet your new profit figure.
Ex 8: Suppose you’re a sales representative for a packaging business. You must achieve Rs.1,00,000 in
sales this year to receive a bonus. Till date you have sold 2,000 units of a product with a per-unit sales
price of Rs.3.46. How many units must you sell to achieve your Rs.1, 00,000 goal?
Ex 9a: You are planning to apply for loan .Suppose you know the loan amount, interest rate, and
number of periods in years. They are as follows:
Loan Amount = 30,000
Interest Rate (annual) = 10%
Number of years = 5
Monthly payment =?
15
Given this data you want to know the monthly payment at several interest rates varying between 6%
and 9%.
Ex 9b: Using the data given in part (a), calculate monthly payment for several different combinations
of total mortgage periods (3 years – 6 years) and interest rate (6% - 9 %).
Ex 10: Suppose you borrow 400000 on a 20 year car mortgage and the interest rate is 0.5% per month.
Create a table that shows for amounts borrowed between 300,000 and 600,000(in 50,000 increments)
the difference in payments between a 15 year, 20 year, and 30 year mortgage.
Ex 11: In mortgage problem, suppose you need to borrow 200000 for 15 years. If your maximum
payments are limited to 2000 per month, how high an annual interest rate can you tolerate?
Ex 12: For mortgage problem use scenario manager to create a report tabulating monthly payments
for the following scenario:
16
Data Analysis and Decision Optimization Using Solver (SESSION 7-8)
Correlation, Regression and other Statistical Functions: Excel provides you with a number of
statistical functions to perform statistical analysis on the data. Ex: A teacher needs to
determine the average grade for each of her students. A grocery store wants to find out what
the variation is between their sale price and the competition’s.
One can use the following statistical functions: Mean, Median, Mode, Standard Deviation,
Variance, Frequency, Correlation, Regression etc. Descriptive Analysis as part of Analysis
Toolpak (Excel Add-in) presents various statistics in a snapshot.
Linear Programming and Optimization with Solver: Linear Programming (LP) is one of the most
popular Operations Research techniques for solving allocation problems and has become a standard
for businesses and organizations. For e.g. what should be the product mix in a manufacturing plant
that maximizes profit or what kind of product mix minimizes the cost?
PRACTICE EXERCISE – 4
1. You have been given the Student Computing Survey Data (Student ID, DoB and Age). Prepare
a frequency table to find the number of students in the age group less than or equal to 22,
>22 - <=31, >31 - <=40, >40 - <=60 and >60 - <=80.
Use the analysis Toolpak to draw a histogram for age from above dataset.
2. Suppose you want to determine whether a person's salary is a function of his or her education
level (measured in years). Interpret the result.
3. Using the Sales data about the beauty products (session-2) find the commission for each sales
transaction as per the commission rules given in commission sheet.
4. Using the same Sales data calculate the sales commission as per the sales transaction done in
different city. Commission rates given the commission-2 sheet.
5. A TV Company produces two types of TV sets, the Astro and the Cosmo. There are two
production lines, one for each set, and there are two departments, both of which are used in
the production of each set. The capacity of the Astro production line is 70 TV sets per day.
The capacity of the Cosmo line is 50 TV sets per day. In department A picture tubes are
17
produced. In this department the Astro set requires 1 labor hour and the Cosmo set requires
2 labor hours. Presently in department A maximum of 120 labor hours per day can be assigned
to production of the two types of sets. In department B the chassis is constructed. In this
department the Astro set requires 1 labor hour and the Cosmo also requires 1 labor hour.
Presently, in department B a maximum of 90 labor hours per day can be assigned to
production of the two types of sets. The profit contributions are 20 and 10 dollars,
respectively, for each Astro and Cosmo set. Maximize the profit by optimally utilizing the
resources.
6. The Acme Company manufactures two products – widgets and gadgets. The company earns
a profit of Rs.2 per box for widgets and Rs.3 a box for gadgets. Each product is assembled and
packaged. It takes 9 minutes to assemble a box of widgets and 15 minutes for a box of
gadgets. The packaging department can package a box of widgets in 11 minutes, while a box
of gadgets takes 5 minutes. Acme wants to find out what combination of boxes of widgets and
gadgets will maximize total profit, given that there is a maximum of 1800 hours available in
both the assembly and packaging departments.
7. A personnel manager must schedule the security force in such a way as to satisfy the staffing
requirements shown in Table
The personnel manager wants to determine how many officers should work each shift in order
to minimize the total number of officers employed, while still satisfying the staffing
requirements.
18
8. A grocery store operates seven days a week. A minimum number of employees is required
each day, depending upon the day of the week (as per Table below). The store requires staff
to work five consecutive days, followed by two days off, e.g. an employee working Monday
through Friday gets Saturday and Sunday off. Formulate and solve so as to minimize the
number of employees needed, while meeting the minimum staff requirements (remember
that employee numbers must be integers).
9. A Production Problem. Wood Walker owns a small furniture shop. He makes three different
styles of tables: A, B, C. Each table requires a certain amount of time for cutting component
parts, for assembling, and for painting. Wood can sell all the units he makes. Furthermore,
model C may be sold without painting. Wood employs several individuals who work on a part-
time basis, so the time available for each of these activities varies from month to month. Use
the data that follows to formulate an LP model that will help Wood determine the product
mix that will maximize his profit next month.
Model Cutting (HR) Assembling (HR) Painting (HR) Profit per Table ($)
A 3 4 5 25
B 2 3 5 20
C 4 5 4 50
Unpainted C 4 5 0 30
Capacity 150 200 300
10. Financial Planning. Willie Hanes is president of a one-person investment firm that manages
stock portfolios for a number of clients. A new client has just requested the firm to manage a
$100,000 portfolio. The client would like to restrict the portfolio to a mix of the three stocks
shown in the following table. Formulate an LP to show how many shares of each stock Willie
should purchase to maximize the estimated total annual return.
11. A Blending Problem. Douglas E.Starr, the manager of Heavenly Hound Kennels, Inc., provides
lodging for pets. The kennels’ dog food is made by mixing three grain products to obtain a
19
well-balanced dog diet. The data for the three products are shown in the following table. If
Douglas wants to make sure that each of his dogs consumes at least 8 ounces of protein, 1
ounce of carbohydrate, and no more than 0.5 ounces of fat each day, how much of each grain
product should each dog be fed in order to minimize Douglas’s cost? (Note: 16 ounces = 1
pound).
Grain Product Cost Per Pound ($) Protein (%) Carbohydrate (%) Fat (%)
A 0.45 62 5 3
B 0.38 55 10 2
C 0.27 36 20 1
12. A glass manufacturer uses three production plants to assemble its products, mainly glass
doors (x1) and wooden frame windows (x2). Each product requires different times in the three
plants and there are certain restrictions on available production time at each plant. The
maximum production time in three plants is 4, 12 and 18. Plant 1 requires an hour of
production time x1, plant 2 requires two hours of production time of x2 and plant three
requires 3 hours of product x1 and 2 hours of x2. The management of the company wishes to
determine what quantities of each product they should be producing in order to maximize
profits. The profit per unit for x1 and x2 is 3 and 5 respectively.
13. A computer manufacturing plant produces mice keyboards and video game joysticks. The per-
unit profit, per-unit labor usage, monthly demand and per-unit machine usage are given in
the following table. Each month, a total of 13,000 labor hours and 3000 hours of machine time
are available. How can the manufacturer maximize its monthly profit contribution from the
plant?
14. Jason the jeweler makes diamond bracelets, necklaces and earrings. He wants to work at most
160 hours per month. He has 800 ounces of diamonds. The profit, labor time and ounces of
diamonds required to produce each product is given below. If demand for each product is
unlimited, how can Jason maximize this profit?
Unit Profit Labor hours per unit Ounces of diamond per unit
Bracelet 300 0.35 1.2
Necklace 200 0.15 0.75
Earnings 100 0.05 0.5
15. A drug company produces drugs in Los Angeles, Atlanta and New York. The Los Angeles Plant
can produce up to 10000 pounds of drugs per month, Atlanta 12000 pounds per month and
New York 14000 pounds per month. Each month, the company must ship to four regions of
US – East, MidWest, South and West. The number of pounds shipped to four regions is given
in excel file. For e.g. The West region must receive at least 13000 pounds of drugs each month.
The cost per pound of producing a drug at each plant and shipping the drug to each region is
also given in excel. Which is the cheapest way to get each region the quantity of drugs they
need?
20
16. A company produces two products that are processed on two assembly lines. Assembly line
1 has 100 available hours, and assembly line 2 has 24 available hours. Each product requires
10 hours of processing time on line 1, while on line 2 product 1 requires 2 hours and product
2 requires 3 hours. The profit for product 1 is $6 per unit, and the profit for product 2 is $4
per unit. Formulate and solve linear programming model for this problem.
17. The Kalo Fertilizer Company makes a fertilizer using two chemicals that provide nitrogen,
phosphate, and potassium. A pound of ingredient 1 contributes 10 ounces of nitrogen and 6
ounces of phosphate, while a pound of ingredient 2 contributes 2 ounces of nitrogen, 6 ounces
of phosphate, and 1 ounces of potassium. Ingredient 1 costs $3 per pound, and ingredient 2
costs $5 per pound. The company wants to know house many pounds of each chemical
ingredient to put into a bag of fertilizer to meet minimum requirements of 20 ounces of
nitrogen, 36 ounces of phosphate, and 2 ounces of potassium while minimizing cost.
Formulate a linear programming model for this problem and solve.
18. The Pinewood Furniture Company produces chairs and tables from two resources labor and
wood. The company has 80 hours of labor and 36 pounds of wood available each day.
Demand for chairs is limited six per day. Each chair requires 8 hours of labor and 2 pounds of
wood to produces, while a table requires 10 hours of labor and 6 pounds of wood. The profit
derived from each chair is $400 and from each table, $100. The company wants to determine
the number of chairs and tables to produce each day in order to maximize profit. Formulate
and solve linear programming model for this problem
19. A jewelry store makes necklaces and bracelets from gold and platinum. The store has 18
ounces of gold and 20 ounces of platinum. Each necklace requires 3 ounces of gold and 2
ounces of platinum, while each bracelet requires 2 ounces of gold and 4 ounces of platinum.
The demand for bracelets is no more than four. A necklace earns $300 in profit and a bracelet,
$400. The store wants to determine the number of necklaces and bracelets to make in order
to maximize profit. Formulate and solve linear programming model for this problem.
ADDITIONAL EXERCISE - 4
Ex 1: Jason the jeweler makes diamond bracelets, necklaces, and earrings. He wants to work at
most 160 hrs per month. He has 800 ounces of diamonds. The profit, labor time, and ounces of
diamonds required to produce each product are given below. If demand for each product is
unlimited, how can Jason maximize his profit?
Product Unit profit Labor Hours per Unit Ounces of Diamonds per Unit
Bracelet $300 0.35 1.2
Necklace $200 0.15 0.75
Earrings $100 0.05 0.5
Ex 2: The number of telephone reservation operators needed by an airline during each time of day
is as follows:
21
8 P.M. – Midnight 22
Each operator works one of the following 6 hour shifts: mid-night-6A.M., 6 A.M. – Noon, Noon –
6 P.M., 6 P.M. – Midnight. What is the minimum number of operators needed?
Ex 3: The distance between Boston, Chicago, Dallas, Los Angeles, and Miami are given in the
following table. Each city needs 40,000 kilowatt hours of power, and Chicago, Dallas, and Miami
are capable of producing 70,000 kwh. Assume that shipping 1000 kwh over 100 miles costs $4.00.
From where should power be sent to minimize the cost of meeting each city’s demand?
Ex 4: We produce drugs at several locations and sell them at several locations. The decision of
where to produce goods for each location can have a huge impact on profitability. We are using
following assumptions:
We produce drugs at six locations and sell to customers in six different areas.
Tax rate and variable production cost depend on the location where the drug is produced.
For example, any units produced at location 3 cost $6.00 per unit to produce and profits
from these are taxed at 20 percent.
The sales price of each good depends on the place where the good is sold. For example,
each product sold in location 2 is sold for $40.00.
Production Location 1 2 3 4 5 6
Sales price $45 $40 $38 $36 $39 $34
Tax rate 30% 40% 20% 40% 35% 18%
Variable production cost $8 $7 $6 $9 $7 $7
Each of our six plants can produce up to 6000000 units per year.
The annual demand (in millions) for our product in each location is as follows:
Sales Location 1 2 3 4 5 6
Demand 1 2 3 4 5 6
The unit shipping cost depends on the plant where the product is produced and the location
where the product is sold.
22
For example, if we produce a unit at plant 1 and sell in location 3 it costs $5 to ship it.
How can we maximize after-tax profit with our limited production capacity?
Ex 5: A manufacturer produces both motorized and manual trucks. The hand trucks are assembled
in shop 1, and finishing operations are done in shop 2. A motorized truck requires two hours to
assemble and three hours to finish, while a manual truck requires five hours to assemble and three
hours to finish. Shop 1 has 180 hours available for assembly, and shop 2 has 135 hours available
for finishing. The profit for a motorized hand truck is $200, and the profit for a manual hand truck
is $300. The manufacturer wants to determine the number of each type of hand truck to produce
so that profit will be maximized. Formulate a linear programming model for this problem.
Ex 6: A caning company produces two sizes of cans – regular and large. The cans are produced in
10,000 – can lots. The cans are processed through a stamping operation and a coating operation.
The company has 30 days available for both stamping and coating. A lot of regular-size cans
requires two days to strip and four days to coat, while a lot of large cans requires four days to strip
and two days to coat. A lot of regular-size cans earns $800 profit, and a lot of large-size cans earns
$900 profit. In order to fulfill its obligations under a shipping contract, the company must produce
at least 9 lots. The company wants to determine the number of lots to produce of each size can (
x1 and x2) in order to maximize profit. Formulate a linear programming model for this problem.
Ex 7: A California grower has a 50-acre farm on which to plant strawberries and tomatoes. The
grower has available 300 hours of labor per week and 800 tons of fertilizer, and has contracted
for shipping space for a maximum of 26 acres’ worth of strawberries and 37 acres’ worth of
tomatoes. An acre of strawberries requires 10 hours of labor and 8 tons of fertilizer, while an acre
of tomatoes requires 3 hours of labor and 20 tons of fertilizer. The profit from an acre of
strawberries is $400, and the profit from an acre of tomatoes is $300. The farmer wants to know
the number of acres of strawberries and tomatoes to plant in order to maximize profit. Formulate
a linear programming model for this problem.
23
Introduction To Excel Macros and VBA (SESSION 9-10)
Command button Use a command button to run a macro when a user clicks the button.
Combo box A combo box creates a drop-down list that lets users select an item from a set
of items you define or enter an item in the list.
Check box Use a check box to let users make selections from a series of options. A user
selects the check box to indicate yes (or true). A user clears a check box to indicate no (or
false). You can place a set of check boxes in a group box to present them as a single
element. Users can select more than one check box in a group to indicate a range of
choices. (For example, on an order form, users could select each of the product categories
they want to review.)
Spin button Add a spin button to increase or decrease the value (within a minimum and
maximum value that you define) in a specific cell. When you click the up or down arrow
on the spin button, the value in the cell that the button is linked to changes, and you can
see how these changes affect the results of formulas, for example.
List box Use a list box to display a set of items from which users can choose (a set of nine
colors, for example). You can define a list box so that users can select only a single item,
multiple items that are adjacent, or multiple items that are not adjacent.
Option button An option button marks one in a set of exclusive options. For example,
Update Manually or Update Automatically. As you do with check boxes, you often present
option buttons within a group box.
Group box A group box organizes a set of controls into a single element. You usually use
a group box with check boxes or option buttons.
Label Use a label to identify or describe the function of a cell, cell range, or another
control. You can use a label as you would a caption.
Scroll bar The scroll bar control is similar to the spin button. As you change the position
of the scroll bar, you change a value in the cell the scroll bar is linked to.
Macros enable you to easily automate many repetitive Excel tasks. For example, if you often
apply a particular format to a range of cells, you can create a macro that performs this
formatting task with the click of a button. Perhaps there is a set of headings you often use in
your worksheets.
Recording Macro: To record a macro, begin by displaying the Developer tab. To begin
recording a macro, simply click Record Macro in the Code group (or click on the Ready icon
displayed in the lower-left corner of your screen. You will then see the Record Macro dialog
box.
Let’s now look in more detail at the following four parts of the Record Macro dialog box:
Macro Name Excel gives a default name (such as Macro1) to a macro. You will probably want
to create a more informative name for your macro.
24
Shortcut Key As you will soon learn, there are many ways that you can run a macro. By creating
a shortcut key, you define a sequence of keystrokes that can be used to run the macro. For
example, entering Shift+F ensures that the Ctrl+Shift+F key sequence will cause your macro
to run. You must be careful in assigning a shortcut-key sequence. For example, since Ctrl+B
boldfaces a selection, you cannot simply use Ctrl+B as your shortcut key. The creation of a
shortcut key is optional.
Store Macro In The default choice is to store the macro in the current workbook. Then the
macro is available to run whenever the workbook is open. If you want your macro to always
be available, you can choose to store the macro in the Personal Macro Workbook.
Description Filling in this field is optional, but you might want to enter a description of the
macro, especially if you’re sharing the Excel file.
After you have filled in the Record Macro dialog box, you are ready to record your macro.
Click OK, and then perform the tasks you want to be repeated when the macro runs. When
you’re finished, select Stop Recording on the Developer tab in the Code group. (The Record
Macro option changes to Stop Recording.) To stop recording, you can also click the small gray
rectangle that appears in the lower-left portion of your screen (under the worksheet tabs).
Power Pivot is an add-in that enables you to efficiently store and query large volumes of data
(think hundreds of millions of rows) that you can combine from multiple data sources and
multiple data formats. For example, some of your data may come from a Microsoft Access
database, some from a text file, some from several Excel files, and some from live data
imported from a website. Pivot tables and pivot charts can easily be created from hundreds
of millions of rows of data.
Steps to Record a Macro: By recording a simple macro in Excel we will go through the basics of Excel
VBA. Here “recording” means that the actions you take in Excel are translated into written VBA code.
Once it is transformed into code the recorded actions can be repeated as many times as you like by
launching ("running”) the recorded macro.
Let´s assume we want to record how we copy & paste the value we enter in one cell to many
other cells.
Type “Hello” in Cell A1. This will be the cell we will copy & paste to other cells.
Go to Developer -> Record Macro”.
Enter the macro name as Macro1 and shortcut as ctrl+a
Click record macro and copy data in cell A1
Select range B4:F10 and paste.
Stop recording.
Now to test the macro, change the text in cell A1
Press ctrl+a and you will find the values in range B4:F10 changing.
To see the programming code generated by the recorder we have to go to the VBA editing
window. It can be accessed either by pressing Alt+F11
To find our macro double click on the “Modules” folder in the “Project” window. Then
double click “Module1” and the programming code shows.
25
PRACTICE EXERCISE - 5
1. Suppose you have been given the Profit data for the period 2001-2009. Record a macro to apply
font color red and size 30 to the title Recording Macros. Make Year and Profit as bold and font size
16. Change the color of values for Year as Blue and apply conditional formatting on values for
profit. If Profit is negative display with red color. Save the macro as “formatting”.
In another sheet apply the macro on the sample data provided for the period 2010 to 2018.
2. The Format Control dialog box allows a minimum value of 0. Despite this limitation, can you figure
out a way to use a spin button to vary sales growth between –10 percent and 20 percent?
3. Create spin buttons for following data that allow the inputs to vary within the following ranges:
4. Create spin buttons that allow inputs, the mortgage payment, to vary within the following ranges:
5. Create a spinner that lets you graph of monthly sales that always displays just the last six months
of sales (ranging from three to eight months).
6. Your MBA team members are Rahul, Ashish, Rohit, and Anuj. Create a macro that enters the team
members in cells A1:D1.
7. Modify macro (created in previous exercise) to enter the team members in a single row, starting
in any cell you want.
ADDITIONAL EXERCISE - 5
Ex 1: Create a macro that will place a red border (boldfaced) around any set of selected cells.
Ex 2: Create a macro that will format any selected range in bold italics.
Ex 3: Ctrl+A selects all cells in the current worksheet. Use this fact to create a macro that will ensure
that each cell in a worksheet is formatted in boldfaced italics.
Ex 4: If you want to freeze the results of a range resulting from formulas and then change the formulas
to values. Create a macro that will find, based on the selected cell, the largest range of cells containing
the current cell and turn all formulas into values. Hint: Ctrl+Shift+* will select the desired range. Test
your macro by entering a bunch of =RAND() functions in your workbook.
26
Ex 5: Create a macro that will highlight an entire column of data in yellow. Your macro should work no
matter how many rows of data are in the column. Hint: Remember to use Ctrl+Shift+Down arrow.
27