Professional Documents
Culture Documents
ITM (Page - 2)
Course Outline: Information Technology for Managers
Course code: IM 501
Credit:3 , Core Course
Area: Information Management
Program: PGDM-Executive
Term I Academic Year 2021-22
_______________________________________________________________________
Instructor(s) Himanshu Joshi Click or tap here to
Name enter text.
Room no. 312 Click or tap here to
enter text.
Email himanshu@imi.edu Click or tap here to
enter text.
Phone (Extn no.) 9873906447 Click or tap here to
enter text.
Meeting Hours appointment (by Click or tap here to
email or phone) enter text.
______________________________________________________________________
1. COURSE DESCRIPTION
In today’s volatile and competitive business environment, organizations face the challenge to
groom mid-level and senior executives to attain top leadership positions. While functional and
domain expertise is crucial for these executives, their success is also contingent on their ability to
effectively make use of commonly available information technology (IT) tools for quick decision
making.
A generation ago computers were first introduced into businesses and organizations to automate
clerical functions and routine transactions. Today, information technology (IT) is an integral part
of any manager’s daily life and forms the backbone for every managerial function of the modern
organization. The speed and flexibility it provides, enables organizations to remain competitive
and sustainable. Whether it be integrating the organization through enterprise system, developing
customer relationship management systems or human resource management system, or executing
financial transaction in electronic markets, information technology helps in linking all the different
functions together in an integrated way and getting information to decision makers at the right time
and in the right format.
The course prepares students to leverage information technology effectively. The course focuses
on the opportunities and challenges posed by information technology, how they affect the world
and what managers need to know for effective decision making through information technology.
The course introduces students to office automation packages like electronic spreadsheet.
ITM (Page - 3)
COs >>
2. COURSE OUTCOMES (COs) COs and POs >>
COs, POs and CECs >>
After going through the course, the students would be able to:
Course Outcome 1 (CO1): Explain organizational data that can be used to support
managerial decision making.
Course Outcome 2 (CO2): Apply spreadsheet functions and formulas for supporting business
operations and managerial decision-making at workplace.
Course Outcome 3 (CO3): Evaluate the results based on multiple perspectives.
COs >>
COs and POs >>
COs, POs and CECs >>
Course Outcomes
(COs)
Program Outcomes (POs)
CO1 CO2 CO3
4. PEDAGOGY
The course will be taught with a blend of presentations, interactive lectures, and discussions. It
will be supplemented by assignments, and practical exercises.
ITM (Page - 4)
5. COURSE EVALUATION COMPONENTS (CECs)
The final Grade will be calculated as follows:
Assignments (25%): The assignments will be given and is required to be done in a group
with the dual purpose of practicing problem solving as well as evaluating decision
alternatives.
Quizzes (35%): The quizzes will be based on the course covered in the previous classes.
There will be n quizzes (n will be decided by the faculty) spread across the entire course.
Quizzes will mostly be computer lab-based exercises.
End Term (40%): End term exam will cover all the topics. Questions asked will cover
questions from various areas of management to test the problem-solving ability of the student.
COs >>
6. MAPPING BETWEEN COs, POs and CECs COs and POs >>
COs, POs and CECs >>
7. RESOURCES
7.1 Textbook
Exercise Book
Microsoft Office Excel 2013 – Data Analysis and Business Modeling by Winston L.
Wayne, Microsoft Press, Prentice Hall India
Microsoft Office Excel 2013 – Building Data Models with PowerPivot – Microsoft PHI
by Alberto Ferrari and Marco Russo
Analyzing Data with Microsoft Power BI and Power Pivot for Excel – Microsoft PHI by
Alberto Ferrari and Marco Russo
Decision Making Using Microsoft Excel by Albright, Winston, Zappe, Cengage Learning
Accessing & Analyzing Data with MS-Excel by Cornell, PHI.
ITM (Page - 5)
7.3 Online References (if any)
1. http://www.seu.ac.lk/cedpl/student%20download/Excel%202010%20Bible.pdf
2. http://gegeek.com/documents/eBooks/MS%20Excel%202013%20Plain%20and%20Simp
le.pdf
3. http://www.seu.ac.lk/fac/student%20download/MS%20Excel%202010%20Step%20by%
20step.pdf
4. www.gcflearnfree.org/excel2010/
5. http://www.goodwin.edu/computer_resources/pdfs/excel_2010_tutorial.pdf
6. http://www.usd.edu/academics/center-for-teaching-and-learning/upload/Excel-3-
Formulas-and-Functions.pdf
7. http://spreadsheets.about.com/od/excelformulas/ss/2010-12-25-excel-2010-basic-tutorial-
pt1.htm
8. Power Pivot - https://support.office.com/en-us/article/Start-the-Power-Pivot-in-
Microsoft-Excel-add-in-a891a66d-36e3-43fc-81e8-fc4798f39ea8
9. http://sqlmag.com/sql-server-2012/understanding-powerpivot-and-power-view-
microsoft-excel-2013
10. http://video.ch9.ms/sessions/teched/eu/2014/Labs/DBI-H318.pdf
11. Book -
https://ptgmedia.pearsoncmg.com/images/9780735676343/samplepages/9780735676343.
pdf
12. http://www.excel-2010.com/
13. http://www.easyexcelvba.com/
14. http://www.excel-vba.com/excel-vba-solutions-beginners.htm
15. http://www.excel-easy.com/vba/create-a-macro.html
16. http://www.learnexcelmacro.com/excel-macro-tutorial/
17. MS Access Video Tutorials - http://www.access-programmers.co.uk/microsoft-access-
tutorials/
18. http://wps.aw.com/wps/media/objects/8911/9125833/labs/newlabs/lab10s.pdf
19. http://www.itu.dk/~slauesen/UID/AccessTutorial.pdf
ITM (Page - 6)
8. SESSION PLAN
ITM (Page - 7)
11-12 Managing Operations Data and its (Refer to Chapter 9 of
Applications Textbook)
Optimization Tools and
Techniques
a) Plagiarism is the use of or presentation of ideas, works that are not one’s own and which
are not common knowledge, without granting credit to the originator. Plagiarism is
unacceptable in IMI and will invite penalty. Type and extent of penalty will be at the
discretion of the concerned faculty.
b) Cheating means using written, verbal or electronic sources of aid during an examination/
quiz/ assignment or providing such assistance to other students (except in cases where it is
expressly permitted by the faculty). It also includes providing false data or references/list
of sources which either do not exist or have not been used, having another individual write
your paper or assignment or purchasing a paper for one’s own submission. Cheating is
strictly prohibited at IMI and will invite penalty as per policies of the Institute .
ITM (Page - 8)
Introduction to Excel as an Analytical Tool
Excel Formulas and Functions
(Sessions 1-2-3-4)
Reference: Chapter 1, 2, 3, 4 & 7 of Textbook
1) Cell Referencing: In excel, you refer another cell or range of cells in your formula. This cell
reference can either be absolute, relative or mixed mode reference.
2) Consolidating Data: If you have worksheets that are identical to each other (except the values),
the data consolidation feature can be used to consolidate the worksheets into a summary report.
4) Functions: A function is just a built-in formula. Functions have been added to excel to simplify
performing specific mathematical operations in the spreadsheet. There are nine categories of
functions in Excel (Financial, Date & Time, Math & Trig, Statistical, Lookup & Reference,
Database, Text, Logical, and Information)
A Date & Time function is a function that assigns a serial number to date and time data in order to
use the data in a calculation. Commonly used are Day, Month, Year, Weekday, Now, Today,
DateDif() etc.
It helps you to format the data in the way you want. Available text functions are LEFT, RIGHT,
MID, TRIM, LEN, FIND, SEARCH, REPLACE, CONCATENATE, VALUE)
IF Function: IF function is a logical function that performs a calculation only if the criteria is met.
There are six logical function (AND, OR, IF, NOT, TRUE and FALSE). Based on whether the
criteria is true or false, the value is calculated. It is possible to nest multiple IF functions within
one Excel formula. You can nest up to 7 IF functions to create a complex IF THEN ELSE
statement.
ITM (Page - 9)
OR Function: The OR function returns TRUE if any condition is TRUE. It returns FALSE if all
conditions are FALSE.
AND Function: The AND function returns TRUE if all conditions are TRUE. It returns FALSE
if any of the conditions are FALSE.
The OR and AND Function can only determine if the condition is true or false. By combining it
with IF function; it increases the capabilities of spreadsheet.
NOT Function: The NOT function returns the reversed logical value.
4.4 Conditional Functions: These functions allow you to perform a calculation only if a certain
condition is met. These include COUNTIF, SUMIF, AVERAGEIF
4.5 Database Functions: Excel provides a number of database functions which help in
extracting information from your database. For example, counting how many students met certain
conditions, add up certain information depending on some conditions. The important thing about
database functions is that it allows you to specify the criteria within the spreadsheet itself. These
include DSUM, DAVERAGE, DCOUNT etc.
4.6 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.
OFFSET Function: An Offset function is used to create a reference to a range, that is a specified
number of columns and rows away from a cell or a range of cells.
where
4.7 Correlation, Regression and other Statistical Functions: Excel provides you with a number
of statistical functions to perform statistical analysis on the data. Example: 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.
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.
Correlation: A correlation is a single number that describes the degree of relationship between
two variables.
Regression: A linear regression is just a statistical tool used to determine whether or not two (or
more) variables are linearly related. The general form of the relationship is given by the formula
Y = a + bX + error.
5) Conditional Formatting: It helps you to specify formatting for range of cells based upon
criteria or contents of cell range. Conditional formatting is available under Home tab.
Exercise – 1
Q1) ABC Business School conducts different kinds of vocational certification courses and
each course that they offer is restricted to maximum 10 students. As part of the certification
process they conduct number of quizzes, give couple of assignments to the students and also
conduct the final exam at the end of the course. Each component of the evaluation is done out
off 100 marks, but each component carries a different weightage. The total marks scored by
each student are to be calculated keeping the weightage for each component in mind. The
examination section of the ABC Business School is not organized well and they capture the
data about the students and their performance in a disorganized manner as given in the three
sheets of Exercise-1.xlsx. The data in Students worksheet is about their performance in various
components; The Name worksheet has the names of the students and the Grades worksheet
consists of Grading Policy of the School. You have been hired by ABC Business School to
manage the data and generate various reports using the relevant data from all the three
worksheets.
1.Organize the data that is spread across three sheets for reporting:
ITM (Page - 11)
a. Create a unique ID for each student by and combining Student ID, Program and
Section.
b. Display the student first name and last name in Student sheet.
c. Concatenate the first name and last name with an empty space in between.
d. Use appropriate function to extract Student ID, Program and Section from the
unique id.
2. Calculate the total marks for each student based on the weightages.
3.A Student is declared “Pass” if the total mark scored by the student is more than 75
otherwise “Fail”.
4. Give a rating of Good, if the total marks is more than or equal to 60 and at least one of the
component marks is greater than or equal to 35. Give a rating of Poor otherwise.
5. Find the grade for each student based on the total marks obtained using the grading policy.
6. Compute the following Statistics about the class performance:
a. Average Marks scored in each component
b. Max Marks scored in each component
c. Minimum Marks Scored in each Component
d. Count the Number of students for each of the components
7.Using DOB of students:
a. Extract the day of DOB
b. Extract month of DOB
c. Extract year of DOB
d. Extract Day of the week from DOB
8.Using the system date, find the Age of each Student in terms of days, months and year.
9. How many students have scored more than 50 in Assign1?
10. Compute the class average for those students who have scored at least 60 marks.
11. Compute the total marks by including only those component marks where the student has
scored more than 35.
12. Compute the average marks of those students who born in the month of May.
13. Create a rule to identify duplicate values in the DOB column.
14. Highlight in Blue color where the Total >70 and in red color where Total < 35
15. Highlight cells in which total scores increased over previous student in one color
and in which scores decreased over previous student in another color.
16. Create a rule to identify total score which are greater than average scores.
17. Create a rule to identify total scores value is less than 35 to display a down arrow, from
35 to 60 to display a horizontal arrow, and 60 or greater to display an up arrow.
18. Highlight all Saturdays and Sundays in red.
19. What is the average score of female students who have scored more than 40 in Quiz?
20. Find the total number of employees in the dataset with age more than 25 years.
21. Find the number of students born in the year 1991 and have scored more than 60.
Q3) You have been given the Product ID and the price. Given a productID, find the product price?
Q4) 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%
100,000 and above 40%
Q5) 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.
Date sold Price
Jan – April 2005 98
May-August 2005 105
September-December 2005 112
Q6) 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.
Q7) 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 ware house-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.
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.
Q8) 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.
Q9) Use the analysis Toolpak to draw a histogram for age from above dataset.
Q11) 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.
Practice Exercise 1
Example 1 - Weekly Wages Computation - Suppose you are given the following data related to a
week on each employee of a company:
Further, the following data that applies to all employees is also given:
Design a spreadsheet to contain the above data, and to compute using this data the following:
Example 2 - Personal Database – You are asked to use the given staff data to selectively retrieve
and extract a part of the information as given below.
Example 3 - Sales Revenue Query: Handling Complex Queries - The following table shows
the maximum and minimum daily sales revenue earned by a company in 10 cities, considering
the sales in the month of June.
A B C D
1 Sales Revenue per day during June
2 (Rs 000)
3 City Max Min
4 A 90 30
5 B 40 40
6 C 60 50
7 D 85 20
8 E 40 20
9 F 35 30
10 G 85 5
11 H 75 48
12 J 55 45
13 K 64 60
i. How many cities are there whose maximum sales revenue was greater than Rs 50000
OR the average sales revenue (take the average as equal to half of the sum of
maximum and minimum revenues) was greater than Rs 35000?
ii. How many cities are there whose maximum sales revenue was greater than Rs 80000
AND minimum was less than Rs 10000?
You have been provided with the sample data for ten candidates. Please calculate the total
number of candidates eligible for promotion and total number eligible for cash award.
Example 5 - XYZ Store pays a 8 percent bonus on sales over $5,000 to store managers. You
have received the quarterly sales data and are required to determine the bonus on sales above
$5000.
Example 6 - If I ordered 500 units of a product I pay $3 per unit. If I order between 501 and
1200, I pay $2.70 per unit. If I order between 1201 and 2000, I pay $2.30 per unit. If I order
more than $2000, I pay $2.00 per unit. Write a formula that calculates the purchase cost as a
function of number of units purchased?
Example 7 - In a dice game two dice are tossed. If the total on the dice on the first roll is 2, 3, or
12, you lose. If the total is of the dice on the first role is 7 or 11, you win. Otherwise, the game
keeps going. How can I write a formula to determine the status of game after first roll?
Example 8 - The following problem refers to the data for Jan sales and Feb. sales. Each sheet
contains the unit sales, dollar revenues, and product sold for each transaction during the month.
Create a consolidated worksheet that gives by region the total unit sales and dollar revenue for
each product. Also create a consolidated sheet that gives by region the largest transactions for each
product from the standpoint of revenues and units sold.
Example 9 - 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
Example 10 - 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).
Example 11 - 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.
Example 12 - 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.
Example 13 - 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.
Example 14 - You have been given the customer code (CCODE), Customer type (CTYPE),
product purchased (PCODE), quantity purchased (QTY), and the total monetary value
(AMOUNT) of the sale for six sales transactions (The values in AMOUNT field are concealed
from you). The AMOUNT is computed as quantity multiplied by unit price after applying an
appropriate discount; unit price is Rs 10 for all products; however, the percentage discount, D1 or
D2, depends on whether CTYPE is 1 or 2 respectively. The values of D1 and D2 for each of the
products are given. The AMOUNT is computed through a formula for the first transaction; the
formula is copied to subsequent cells. What is the formula in Amount Cell?
Example 15 - Let’s say we monitor quality of a plant producing glass bulbs. One of the KPIs we
monitor is % of rejected bulbs. We have been tracking the % of rejects by day in a spreadsheet
given to you. Calculate the average rejects of latest week? Please note that the data for % rejects
will keep on building with time.
2) Data Subsets or Filtering of Data: There are two ways of Filtering – AutoFilter and Advanced
Filter.
4) 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.
Discrete variable: This generally takes small number of unique values. Eg. Dept. Name, Customer
Names, Product etc. These variables are best suited for row/column fields, although they can be
used 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 the source data, you need to refresh using the red exclamation mark on toolbar to
update the pivot table.
Exercise 2
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 the sales data to find hidden
patterns, for example, which product is in more demand in which location of which city?
1. Organize the Sales data in Ascending order of Units Sold to find the lowest sales
transaction. Is there a better method to find that?
2. Organize the sales data on Name and Product
3. Sales Manager wants to review the performance of “Charu”, so highlight all the
transactions done by Charu in Red color
4. Highlight records where units <50 in red color and otherwise in blue color.
5. Organize the data first by red and then by blue color.
6. Select those records highlighted in blue color.
7. Generate the following Transaction Reports for the Sales Representative indicating total
units sold and total revenue:
o Salesperson wise sales report
o Product wise sales reports
o City wise sales reports
o Salesperson wise, product wise, city wise sales report
8. On the previously generated Salesperson wise, product wise, city wise sales transaction
report also add the average sales revenue and the number of sales transactions done by
each sales person.
9. Generate the MIS report to show only the salesperson wise, product wise sum of sales
revenue and average of sales revenue.
10. Drill the sales transaction data for “mascara” sold by “Eshita”.
Example 2 - Annual sales of different manufacturers are available to you. Identify the discrete and
continuous variables? Find the sum of annual sales for various manufacturers, years and both.
Example 3 - 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 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:-
a) Determine how gender and age influence persons travel expenditure
b) Average amount spend on travel by gender.
c) Average amount spent on travel for each age group
d) Average amount spent on travel by gender for each age group
What recommendations can you make about the type of person to whom you should mail
the brochure?
Example 4 - 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.
Example 5 – Use the Sales Data of ABC Inc. to analyze sales trends as per the following
requirements. The data is available in Example 5 sheet.
Upto 3000
3001 to 5000
5001 to 7000
7001 to 9000
9001 to 12000
12001 and above
11. For the above distribution also find the cumulative frequency.
12. List the salesmen who are doing sales transactions more than 7500.
13. List the salesmen who are doing sales transactions more than 7500 for product P3.
14. List the salesmen who are doing sales transactions more than 7500 for product P3 in
area A02.
15. List the transactions of all salesmen whose name starts with alphabet A.
16. List the salesmen who are doing sales between 7000 and 9500.
17. List the salesmen who are doing sales between 5000 and 8500 in area A02.
18. Extract the only the name of the salesmen whose sales is more than 8000.
19. Extract the name and the area of all those transactions where a sale is between 5000
and 7500.
20. Extract the unique transactions for salesman “Ashok”.
Example 6: Use the ABC Sales data in Example 6 sheet for organizing and summarizing the
sales data
Example 7:
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.
1) Financial Function: Excel provides a range of function to perform financial related operations.
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 eg. 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 eg. 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)
2) What if Analysis using Data Table: 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.
4) Sensitivity Analysis using Scenarios: 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.
5) 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.
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 in reality, finance companies offer different conditions for different situations. You
want to evaluate multiple options as per following conditions:
Company Rate Period
ABC Finance 9.0% 5 years
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 finalise 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?
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 1 st,
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.
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 in order 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
22. Find all IRRs for a project having the given cash flows on the listed dates:
Example 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 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?
Example 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?
Example 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?
Example 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.
Example 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?
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.
Example 7:
a) 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?
b) 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.
Example 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?
Example 9:
a ) 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 =?
Given this data you want to know the monthly payment at several interest rates varying
between 6% and 9%.
b ) 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 %).
Example 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.
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?
Example 12:
For mortgage problem use scenario manager to create a report tabulating monthly payments for
the following scenario:
Exercise – 4
1. ATV 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 produced. In this department the Astro set requires 1 labour 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.
2. 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
3. A personnel manager must schedule the security force in such a way as to satisfy the
staffing requirements shown in Table
Security Staffing Requirements
Time Minimum Number of
Officers Required
Midnight – 4 A.M 5
4 A.M – 8 A.M 7
8 A.M - Noon 15
Noon - 4 P.M 7
4 P.M - 8 P.M 12
8 P.M - Midnight 9
Officers work 8-hours shifts. There are 6 such shifts each day. The starting and ending
times for each shift are given in Table
Security Staffing Requirements
Shift Starting Time Ending time
1 Midnight 8:00 A.M
2 4:00 A.M Noon
3 8:00 A.M 4:00 P.M
4 Noon 8:00 P.M
5 4:00 P.M Midnight
6 8:00 P.M 4:00 A.M
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.
4. 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 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?
10. 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
11. 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?
12. 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.
13. 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
14. 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
15. 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.
2. The number of telephone reservation operators needed by an airline during each time of
day is as follows:
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?
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?
Boston Chicago Dallas LA Miami
Chicago 983 0 1205 2112 1390
Dallas 1815 1205 0 801 1332
Miami 1539 1390 1332 2757 0
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.
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.
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?
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.
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,
ITM (Page - 39)
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.
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.
Before PowerPivot, Pivot Table was the only way to analyze data using excel. With Pivot Table
the greatest limitation was handling data across multiple sheets. It can analyze data coming from
a single sheet or a single table. While working with different excel sheets, there was no simple
way to correlate information using Pivot Tables. Working with limited dataset, Pivot Table
allowed users to work on variables only available within a particular sheet. Further, moving
variables and its associated data from various sheets into one sheet was not always possible.
PowerPivot uses in-memory database and takes advantage of the powerful RAM available in
most computers today. So is PowerPivot an extension of PivotTable? PowerPivot builds on the
existing capabilities of a Pivot Table and provide users with more powerful features and added
functionality. It can be considered a self-service BI tool which is simple to use and helps users
build complex data structures while eliminating the limitations of Pivot Table.
Step 4: Copy the charts to a single worksheet and add slicers - Copy charts from the pivot
table worksheet to your dashboard sheet. Arrange the charts on the dashboard. Then add
“Slicers” which are groups of buttons used so filter the data in your charts. Each slicer can be
attached to multiple pivot tables. When you click on a year in the slicer on the dashboard then
each of the pivot tables attached to that slicer will show data only for that year. In this way slicer
buttons on the dashboard worksheet can control what data is shown on the dashboard charts.
Exercise on PowerPivot
Q1) 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
1. 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?
2. After selecting the two tables, display number of employees in each department
3. Filter the count of records belonging to Department ID 400
4. What is the average starting salary for each department?
5. Display Department name instead of department ID? How do the variables look different from a
Pivot Table?
6. Analyze the relationship between the two tables using PowerPivot.
7. Find the maximum salary drawn by employee with respect to Department and Nationality.
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.
Windows Excel 2007 and later, go to “Developer -> Macro Security” and tick the box of
“Disable all macros with notification”.
Recording 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.
1. Let´s assume we want to record how we copy & paste the value we enter in one cell to many
other cells.
2. Type “Hello” in Cell A1. This will be the cell we will copy & paste to other cells.
3. Go to Developer -> Record Macro”.
4. Enter the macro name as Macro1 and shortcut as ctrl+a
5. Click record macro and copy data in cell A1
6. Select range B4:F10 and paste.
7. Stop recording.
8. Now to test the macro, change the text in cell A1
9. Press ctrl+a and you will find the values in range B4:F10 changing.
10. 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
11. To find our macro double click on the “Modules” folder in the “Project” window. Then double
click “Module1” and the programming code shows.
In another sheet apply the macro on the sample data provided for the period 2010 to 2018.
What is a Database?
Design View will allow you to define the fields in the table before adding any data to the
datasheet. The window is divided into two parts: a top pane for entering the field name, data
type, and an option description of the field, and a bottom pane for specifying field properties.
Field Name - This is the name of the field and should represent the contents of the field
such as "Name", "Address", "Final Grade", etc. The name can not exceed 64 characters in
length and may include spaces.
Description (optional) - Enter a brief description of what the contents of the field are.
Field Properties - Select any pertinent properties for the field from the bottom pane.
Field Properties
Properties for each field are set from the bottom pane of the Design View window.
Field Size is used to set the number of characters needed in a text or number field. The
default field size for the text type is 255 characters. If the records in the field will only
have two or three characters, you can change the size of the field to save disk space or
prevent entry errors by limiting the number of characters allowed. Likewise, if the field
will require more characters, enter a number up to 255. The field size is set in exact
characters for Text type, but options are give for numbers:
Format conforms the data in the field to the same format when it is entered into the datasheet.
The field data formats in Access 2007 have been enhanced to improve the way that tables display
information. You can provide custom formats for each data type in addition to the predefined
formats. Note that the hyperlink, memo and text formats do not have predefined formats.
Relationships are the foundation of something called relational database design. This is where we
have multiple tables that share some sort of commonality or are in some way alike. We can then
take advantage of this fact by creating tables, queries, forms and reports that interact with other
tables, queries, forms, and reports. This is where databases have the ability to become truly
powerful.
Relationships are made from a link that is created among the primary key in one table to a field
in another table that contains the same structure and type of data. This makes sense because you
wouldn’t want to try and connect the LastName field in one table with the ZipCode field in
another. The types simply wouldn’t match! You would logically want to match the LastName
field with a LastName field in another table. It may be named differently, but it will contain the
same type of data. When a table is connected from a primary key in one table to a foreign key in
another table, then it is considered to have connected a primary key and a foreign key. A foreign
key is a field in the table that is not a primary key, but has the same type of information that
makes the field suitable for a relationship.
There are several types of relationships that can exist in a database. The first of these types is a
one-to-one relationship. This indicates that in either table, the same data item can only appear
once. The second type which is one-to-many relationships occur when each record in Table A
may have many linked records in Table B but each record in Table B may have only one
corresponding record in Table A. The final type is the many-to-many relationship. This is
where the same item can appear multiple times in both tables. It’s been explained as a pair of
one-to-many relationships. Think of an automotive service center. A car can be brought in and
serviced on many dates, which is a one-to-many relationship between the car, and the service
date. However, on one date, many cars can be serviced which is also a one-to-many relationship.
Referential Integrity: If we have created relationships between our tables, they become like
rules to live by. The tables must follow these rules. These rules enable referential integrity. Think
of the automotive shop that we mentioned earlier. Let’s assume that they have a database
designed to track their customers. They also have a separate table in that database that tracks the
cars that they’ve worked on. Each car is related to its owner record in the customer table. This
allows us to track the two items individually, but still allows them to be linked together. Well,
what happens when you delete a customer from the database, but forget to delete his cars? When
a customer is deleted and the cars are not, we violate our referential integrity.
1. Import the spreadsheet employees.xls into your staff.mdb database as a new temporary table
with a name of your choice.
2. Switch to datasheet view and see how the changes to the properties have affected the table.
3. Return to design view and add the following properties to the tbl_Employees table:
Field Property Details
Last_Name Required Yes
Salary Validation Rule <50000
Salary Validation Text Too much money!
4. Switch to datasheet view and add two new records with details as follows:
Staff_ID 29 30
First_Name Rhys Arnold
Last_Name Schwarzenegger
Job_Title Finance Assistant Chief Executive
Dept_Name Finance
Salary $1,000,000
5. What happens when you try to add the records and why? Do not add the records.
Lookup fields
1. Import the data from salaries.xls and departments.xls into the database.
2. In the following exercise, you will create the following relationships
Primary table Subsidiary table Common field
tbl_Departments tbl_Employees
tbl_Employees tbl_Salaries
3. For each relationship to be created, ensure that there is a common field in both tables.
4. Ensure that the data types of the common field in each table are compatible.
5. Ensure that the common field in the primary table is designated as the primary key (or at
least has a unique index).
Creating relationships
1. Open up the tbl_Employees table and add the following new record:
Staff_ID 29
First_Name Stephen
Last_Name Fry
DOB 24/08/1957
Job_Title Customer Services Assistant
Dept_ID 700
4. Try to add the new record specified in 1 above once again. Were you successful this time?
Database planning and design requires an understanding of how the data is being used or will be
used by end users. It’s important to understand your user needs for information when designing
the database. Asking yourself questions will help in understanding user requirements and can be a
guide to the kind of queries users need.
What sorts of data comparisons will they want to make?
What methods of sorting/ordering will they need?
How will they want results presented?
What search choices will they need?
In relational database systems, information is stored in different tables. For example, customers'
information is stored in Customers table while their ordering information is stored in Orders
table. In order to retrieve information from one or more than one table, queries are used. Moreover,
queries are capable of performing the functions of filters, namely adding selection criteria and
sorting instructions. In addition, queries allow calculation of new fields. The complexity of your
query will depend on the complexity of the fields that the data is housed in, the functionality of
the database, and the type of information you are trying to gather.
While creating Queries you should specify:
The table fields that appear in a query.
The order of the fields in a query.
Filter and sort criteria for each field in a query.
Append Query – takes the set results of a query and "appends" (or adds) them to an existing table.
Delete Query – deletes all records in an underlying table from the set results of a query.
Make Table Query – as the name suggests, it creates a table based on the set results of a query.
Update Query – allows for one or more field in your table to be updated.
Crosstab Query
A crosstab query presents summary information in a compact format that is similar to a
spreadsheet. These types of queries can present a large amount of summary data in a format that
is usually simpler to analyse than viewing the information in a database form. Each attribute (field)
in a table typically contains a category of data. A crosstab query summarizes the data from one or
more of these fields that are separated into groups based on one or more fields.
Calculated Field
A calculated field is based on other fields of the table. It derives its value from some formula
involving other field values.
Eg. Suppose your table contains a column named Sale Amount, and you want to calculate the
amount of commission earned on each sale. If the commissions were always the same, you'd
simply hard code the commission rate as part of the expression. For instance, if the standard
commission were 10 percent, the expression for your calculated field would look like this:
* allows you to match any string of any length (including zero length)
? allows you to match on a single character
# allows you to match on a single numeric digit
For example:
Additional tasks:
6. Create a second query based on the tbl_Employees table.
7. Display the following fields in this order: First_Name, Last_Name, Job_Title, Telephone.
8. Select all employees who work in the Sales Department (Dept_ID = 100).
9. Do not display the Dept_ID field in the query results.
10. Sort by Job_Title and then by Last_Name, but do not change the order of the fields.
1. Create a query based on the tbl_Employees table. Select all employees whose surnames
begin with the letter “W”. Decide for yourself which fields to display. Save your query with
the name Query 3. How many records are displayed in the query results?
2. Create a query based on the tbl_Employees table. Select all employees with Manager in their
job title. Decide for yourself which fields to display. Save your query with the name Query
4. How many records are displayed in the query results?
1. Create a query based on the tbl_Employees table. Show details for all employees who are
either managers or who work in the Sales Department (Dept_ID = 100). Save your query
with the name Query 5.
2. Create a query based on the tbl_Employees table. Show details for all employees who are
managers in the Sales Department. Save your query with the name Query 6.
Additional tasks:
4. Create a query based on the tbl_Employees table. Show details for all employees who are
officers in either the Finance Department (Dept_ID = 300) or the Personnel Department
(Dept_ID = 500). How many records are displayed in the query results? Save your query
with the name Query 7.
1. Create a query based on the tbl_Employees table. Select all employees who were born before
1950. Decide for yourself which fields to display. Save your query with the name Query 8.
2. Create a second query based on the tbl_Employees table. Select all employees who were
born during the 1960s. Decide for yourself which fields to display. Save your query with the
name Query 9.
Additional tasks:
1. What criterion did you use in step 2 above? How many different ways can you find of
displaying the same results?
3. Create a third query based on the tbl_Employees table. Select all employees who were born
in the month of April. Decide for yourself which fields to display. Save your query with the
name Query 10.
Task Five: null values and excluding data
Create a query which includes all the fields from tbl_Employees. For each of the following
tasks, add criteria to find the appropriate employees, view the results in Datasheet view and then
modify the Criteria rows to carry out the next task.
1. All employees who do have a disability. (Query 11)
2. All employees who do not have a disability. (Query 12)
3. All employees who do not have a telephone number. (Query 13)
4. All employees who do have a telephone number. (Query 14)
5. All employees who are not in the Sales department. (Query 15)
6. All employees who are not managers. (Query 16)
Additional tasks:
7. All employees who are either officers or assistants. (Query 17)
8. All employees who are neither officers nor assistants. (Query 18a and 18b)
Which of the two answers given is correct?
ITM (Page - 56)
Task Six: parameter queries
1. Create a query based on the tbl_Employees and tbl_Departments tables. Display the
following fields: Dept_ID, Dept_Name, First_Name, Last_Name, Job_Title, Telephone,
Dept_Town. Enter a parameter criterion in the Dept_Town field. Save your query with the
name Query 19. Display results for different towns.
2. Create a query based on the tbl_Employees and tbl_Departments tables. Decide for yourself
which fields to display. Enter a parameter criterion in the Dept_Name field. Save your query
with the name Query 20. Display results for different departments.
Additional tasks:
3. Create a query based just on the tbl_Employees table. Decide for yourself which fields to
display. Enter parameter criteria in the DOB field to find employees born between two dates
(you will need two parameters). Save your query with the name Query 21. Display results
for different date ranges.
Task Seven: grouping and aggregate functions
1. Create a query based on the tbl_Employees and tbl_Departments tables. Display the
following fields: Dept_ID, Dept_Name and Staff_ID.
2. Run the query to view the results. Which values are repeated?
3. Add grouping and aggregate functions to the query to enable you to view the number of
employees in each department:
Add grouping to the fields from tbl_Departments
Add a Count function to Staff_ID
4. Display the results of the query.
5. Save the query as Query 22.
Task Eight: grouping and aggregate functions
1. Create a query and use a calculated expression to determine Bonus for all existing employees
which is calculated as 10% to the Maximum Salary drawn..
Save the query as Query 24.
Action Queries
These are different to Select Queries in that, rather than selecting specific data from tables, they
perform an action on the data in the database and they should therefore be used with caution. The
symbol for each of the Action Queries includes an exclamation mark to indicate that running the
Query might alter the data in your database. Action Queries are created by creating a Query in
Design View and then changing the Query Type from Select Query (the default type) to the
appropriate Query Type from the Query Type drop-down menu on the toolbar:
Make-Table Query: The purpose of a Make Table Query is to create a new Table based on the
specific Fields and Records you choose in the Design View.
Append Query: The purpose of an Append Query is to add new records from one Table to another
Table that already exists in your database.
Delete Query: A Delete Query deletes a set of records from one or more Tables. For example,
you could use a Delete Query to remove employees with disability. With Delete Queries, you
always delete entire records, not just selected Fields within records. You can use a Delete Query
to delete records from a single Table, from multiple Tables in a one-to-one relationship, or from
multiple Tables in a one-to-many relationship, if cascading deletes are enabled. For example, you
could use a delete Query to delete all employees of a department. However, you cannot delete
records from the primary Table and the related Tables at the same time. For example, you could
not delete a department when it has employees in it. You would need to run the Query to delete
all employees of the department and then run it again to delete the department in the primary table.
Update Query: An Update Query can be used to make a global change to all records where the
data matches certain criteria.
Top Query
There are times when you only want to see a few of the top results from the query i.e. display a
certain number of results by using the Top Values Box. This is located in the toolbar near the Run
Query (!) button. You can use this box to enter a number of values here or a percentage of the total
records which are displayed in the results window.
Access Forms
Forms are used to create a friendly data-entry interface to enter information into tables and/or
queries; to create custom dialog boxes to carry out actions; or to create switchboards for users to
open other forms and/or run reports. Bound forms are forms that are created from other database
objects, such as tables or queries. Unbound forms are forms created to carry out user’s action,
such as opening other forms or running reports.
With the help of queries and relationships, they allow you to enter data into more than one table
at a time. If your database tables are linked with relationships that enforce referential integrity,
Access Reports
A report is an effective way to present your data in a printed format because you have more control
over the appearance of everything on the report. Most of the information in a report comes from
an underlying table, query which is the source of the report's data.
Exercise-8
We will be using the database created in earlier class: Staff.accdb
1) Crosstab Query: Create a Crosstab Query to find the number of employees in each department
who have a specific Ethnicity or Nationality based on tbl_Employees. What are your row heading
and column heading fields. Which aggregate function is to be used? Save query as Query1
2) Make-Table Query: The Sales Manager has requested a Table containing information about
all the current Employees in his Department. Take all fields of tbl_Employees. Next, add
appropriate criteria to include only Employees in the Sales Department (Dept_ID is 100) who are
current employees (the Field named Date_Left contains the last day of employment for each staff
member and if this Field is null (empty) the person is a current employee). Amend the Query so
that the Dept_ID Field and the Date_Left Field are not displayed when the Query is run. Change
the Query to a Make-Table Query to make a Table called tbl_Employees_Sales. Save query as
Query2
Suppose you did not have an Ethnicity table and you are asked to create a new table ethnicity by
selecting ethnicity field from tbl_Employees. Use Make-Table Query to and Add Grouping so that
each ethnicity is displayed only once. Save query as Query3
3) Append Query: You are going to add some new departments to tbl_Departments using an
Append Query. The records you wish to append are in tbl_Departments_append. Create Query
4) Delete Query: The company has decide to delete records of past employees from the database
who left the company before January 2003. Open tbl_Employees and view the data. Note in
particular the data in the Field named Date_Left which contains the last day of employment for
each staff member. Change the Query into a Delete Query. Save query as Query5
5) Update Query: Human Resources have decided that the longest notice period for any
Department should be two months. Create an Update Query to change all Departments with a
notice period of 3 months to a notice period of 2 months. Save query as Query6
6) Top Query: You want to see the 5 longest serving employees in your company. Their first
SalaryDate indicates when they commenced their employment with the company. Use the Tables
tbl_Employees and tbl_Salaries. Save query as Query7
Exercise on Forms
Task One: Using AutoForm
1. Open tbl_Employees in Datasheet view and observe the types of Data stored. Are there any
combo boxes (drop-down lists) and check boxes. Close the Table.
2. Create a Form based on tbl_Employees using the Form Wizard:
include all Fields except Telephone and Date_Left
choose a Columnar layout
choose the Standard style
name the Form ‘frm_Employees’
1. Open the Form in Design View and re-arrange the controls on the Form so that they appear
in three columns as below. Keep the Labels with their associated bound Controls:
Staff_ID Nationality Job_Title
First_Name Ethnicity Dept_ID
Last_Name Disability Notes
Date of Birth (DOB)
Task Four: Labels and formatting
1. Open the Form frm_Employees in Design view. Insert the picture logo.jpg at the right-hand
side of the Form header. Resize the picture using the corner handles so that it is fully visible.
2. Add the Telephone Field to the Form:
Use the Field List to add the Telephone Field to the Form.
Place it under the Disability Field.
Task Six: Properties
View the Properties for the Telephone text box. Change the Format Property of the DOB text
box to Long Date and view the changes in Form view. Resize the text box to fit the data.
Task Seven: Subform using the Control Wizard
1. Add the Ethnicity and Nationality Fields, moving the Labels to the Page Header and
positioning the Labels and Field Controls appropriately.
2. Change the Page Orientation to Landscape and view the results.
Task Nine: Grouping and Sorting
1. Create a Report based on tbl_Departments and tbl_Employees using the Report Wizard:
Add Dept_ID and Dept_Name from tbl_Departments in that order.
Add Last_Name, First_Name, Job_Title and Telephone in that order
Name the Report ‘rpt_Employees_Departments’
View the Report in Design View and view Grouping and Sorting Properties. What
is the Report grouped by? Modify the Grouping and Sorting Properties so that the
Employees appear in order of Last Name within each Department.
Task Ten - Parameters on a Report
Customer
Account
Customer
Account :
Step 4: Add 5 new Records for Customer (1021, 1022, 1023, 1024, and 1025) as well as in
Account table.
Step 4: Create following queries and save them by the name of Question number ( Query
(a) , Query (b) ..) :
a) List all the details of customers having account balance more than 50,000 Rs.
k) Use input box property to check the details of specific customer’s account.
l) List the cities uniquely in which customers are residing.
m) List the name of the customers starting with “R” alphabet.
n) Generate a query which will help user in getting the details of a specific customer.
a) Create a Form using form Wizard which will display the details of the customer.
b) Create a form which will display the details of account of the customer.
c) Create the following form which will display the account details as well as customer
details.
a) Generate report displaying the account details for each customer ID.
b) Generate a report which will display the sum of balance for both types of accounts in the
bank.
c) Generate a report which will display the account numbers sorted (Ascending order) on
the basis of date of opening account.