Week-1: Homework/Lab Assignments Introduction To Excel
Week-1: Homework/Lab Assignments Introduction To Excel
INTRODUCTION TO EXCEL
1. To learn basic Excel concepts (various copy/paste options, drag down issues, print screen
and create word reports, fixed and relative cell addressing, creating professional looking
black/white (not haphazard!) graphs). We will cover this in one or two lectures.
Lab-1: Finish the tutorial and then solve problems 1, 4, 5, 6, and hand solve 7 in your
homework then show it to the tutors and get a check mark on the attendance sheet before
you leave..
DEVELOPMENT OF LOAN AMORTIZATION TABLE
In this exercise, we will learn how to use spreadsheets to solve simple accounting
problems. We will also learn how easy it is to use multiple formulas within Excel. The
handout is prepared with instructions to be used in Microsoft’s Excel 2007. Some of the
instructions are similar if an earlier version of Excel is used; however, it is required that
you use Excel 2007 or a later version for all the exercises in this class.
Loan Amortization tables show how much you owe a bank every month when
you borrow money from them. This specific problem is a useful practical example
adapted from a problem discussed in Engineering with Excel, by R.W Larson. Let us
assume that you recently graduated and bought a brand new Ford Mustang (with cool
white stripes, of course!). Thanks to government bailouts you got a nice deal of $25,000
at an annual percentage rate (APR) of 6%, with no down payment. You want to pay the
loan within 5 years. In this exercise, you will create an amortization table (monthly
basis) that shows your payment, how much went as interest, how much principal was
paid, and the amount you owe to the bank. The primary concept in preparing this table is
that, each time you make a payment, you have to pay interest on the outstanding
borrowed amount, called Principal. The amount that exceeds the interest amount paid
reduces the principal before the next payment. Before we proceed into the detailed
calculations, we have to set up a spreadsheet for your loan. We will design a general
layout to organize information and make it easy to understand.
1
Figure 1.0 Setting up the spreadsheet
We have now entered all input data needed for our calculation. Now we can
additionally format the cells to make them more presentable. Since the loan amount is in
dollars, we should tell Excel that the number in cell B3 is currency. This can be done by
right clicking on the cell B3 and then clicking on the “Format cells” option. Click on the
“Numbers” tab and choose “Currency” and click OK.
2
Figure 1.2 Formatting cells to display currency.
As observed in Figure 1.3, the loan amount is displayed in currency format and
hence has a $ symbol before the value. You could also change the color and make the
labels bold. Play with the formatting a little to differentiate the input values from the end
results.
Since we make the payments every month, it is necessary to calculate the periodic
interest rate. The APR is 6%; therefore, the interest rate for each month would be (6/12) =
0.5%. The loan term is 5 years; hence the loan will be repaid in 12*5=60 payments. We
should add this additional information into the spreadsheet with appropriate labels.
Assign different colors to the cells to differentiate the input, output and titles. To change
the color of a cell, select the cell and click on the button highlighted by a red box in the
Figure 1.4. Pick an appropriate color from the list.
3
Figure 1.4 After entering additional information (Black box on top shows the
cell color button)
Enter “Total payments” in cell A7 and in cell B7 enter the formula “=B5*B6”.
Type “Periodic Interest Rate” in cell A8 and in cell B8 enter the formula “=B4/B6”. To
ensure that your number displays as a percentage, Right click on cell B8, select “Format
Cells”, Click on the “Number” tab, Select “Percentage” and change the “Decimal places”
to 1 as shown in Figure 1.5. Finally we calculate the monthly payment amount from the
periodic interest rate, principal amount and total number of payments. The payment per
month can be calculated using the formula (which you will learn in your engineering
economics class):
∗
∗ .
.
.
4
Figure 1.5 Changing the numbers to percentage.
Now set up the spreadsheet to calculate the payment information for every month.
This should calculate the interest for each month based on the principal, the amount of
money paid towards the principal after subtracting the interest amount and finally the
principal amount after the payment. Set up the spreadsheet as shown in Figure 1.6.
5
Figure 1.7 Wrap text in the cell.
The principal amount for the first payment is simply the same amount that was
originally borrowed from the bank. So we will enter the formula “=B3” in the cell C12.
Now the interest on this amount is calculated using the simple interest formula i.e.
“Principal amount before payment * periodic interest rate”. The periodic interest rate is
the same for every month; therefore, we must use an absolute address when we use the
periodic interest in the formula. By using the absolute address, we make sure that the
input value does not change when we copy the formula.
6
We subtract the interest from the monthly payment of $483.32 to calculate the
amount paid on the principal. We will use absolute addressing when we reference the cell
with monthly payments, as this stays constant throughout the calculation.
Finally, we subtract the “amount paid on principal” from the “principal amount
before payment”. This will be principal amount for the next month’s payment.
This completes the calculation for the first payment. Now we can calculate the
amount of interest and principal paid by the second payment. The principal for the second
payment is equal to the principal amount after the first payment. So enter the formula
“=F12” in C13.
To calculate the rest of the entries in this table, all we have to do is copy the
formula for cells D12 to F12. This can be done in a couple of ways: Select all cells from
D12 to F12 and right click on them and select “Copy”. Next right click on the cell D13
and choose “Paste”. This calculates all the entries for the second payment.
Figure 1.12 Calculating the second payment using the copy paste method
The second way to accomplish this is to select the cells for D12 to F12 and move
your mouse to the bottom corner of the selected cells as shown in Figure 1.13.
7
Figure 1.13 Calculating the second payment using the click and drag method
When the mouse arrow turns to the + button as shown in Figure 1.13, click and
drag to the next row. This will calculate all the entries for the next payment.
Calculating the next 58 entries is a breeze, as we just have to copy the formula
from cells C13 to F13 and paste it in the next 58 cells either by using the copy-paste
method or the click-and-drag method. In the copy-paste method, select all the cells from
C14:F14 to C71:F71, right click on the cells and choose paste. However, when using the
click-and-drag method, all you have to do is to select the cells C13 to F13 and click at the
bottom corner, then drag down to C71:F71 cells. Excel will automatically fill all the
entries for the next 58 payments. Figure 1.15 shows the amortization table for the first 10
payments.
Figure 1.15 Completed loan amortization table for the first 10 payments.
Notice that the table was already configured to show the $ sign for the all entries.
Ensure that proper formatting is followed to improve the appearance and readability of
the table.
8
INTRODUCTION TO EXCEL - 2
EXCEL GRAPHING
2.1 GENERATING A PLOT FROM A DATA SET:
In this exercise, we will learn to plot graphs using Microsoft Excel 2007. To plot a graph,
we need data that can be graphed. We will use a simple line equation, y= mx + c to generate the
data for this graphing exercise. In this equation, m is the slope of the graph and c is the intercept.
To generate the data, we will assume the x values in the range [0, 10]. Also, the slope of the line,
m, is 0.1 and the intercept, c, is 2. We can utilize Excel’s copy-paste method to quickly generate
the data. First, set up the Excel spreadsheet as shown in Figure 2.1.
9
Figure 2.2 Shows the insert menu and scatter with smooth sub-menu
Line Graph
3.5
3
2.5
2
Y
1.5
1 y
0.5
0
0 2 4 6 8 10 12
10
2.2 GENERATING A PLOT FROM MULTIPLE DATA SETS:
To generate a graph from multiple datasets, we need to first create the multiple data sets.
In this example, we will create these data sets by using the same line graph problem with
different slopes. Consider m = 0.1, 0.2, 0.3, 0.4 and 0.5. Now, recreate the layout as shown in
Figure 2.4 and generate the data for the other 4 lines using the formula y = mx + c.
Multiple Lines
8.00
7.00
6.00
5.00 y at m=0.1
y 4.00 y at m=0.2
3.00 y at m=0.3
2.00 y at m=0.4
1.00 y at m=0.5
0.00
0 2 4 6 8 10 12
11
To add a line to an existing data set, we can copy the new data and paste it on the graph.
We could also click on the graph and this would highlight the cells on the spreadsheet that are
included in the graph. You can then add additional data to an existing graph by extending the
selected cells boundary (blue boundary shown below) to include the adjacent columns as shown
in Figure 2.6. Finally, we could right click on the chart and click on the “Select Data” option and
click on “Add” to add a new series.
12
Right click on each of the lines, select “Format Data Series,” and modify the “Line Color” to
solid line and select black, change the Line style to 1.5 pt, and selected the appropriate Dash
type. Select Marker option, build-in and select the appropriate symbol. Select Maker Fill and,
select solid fill and select black. You might also want to check other options. Repeat the same
for all the lines.
Right click on the axis label (value of X) to select to the font to Arial 12 point bold. Repeat the
same for other axis.
For creating axis titles and editing the titles or other such formatting functions, click on the graph
and this will take you to the “Chart Tools” tab on the top, then select “Layout.”
In the Layout tab and under Gridlines get rid of the horizontal grid lines.
Select the plot, right click and select Format Plot area, change the border color to solid line,
black, and the border style to 1.75 pts.
The label box can be moved into the graph by simply selecting it and dragging it into the plot.
Clement's Multiple Lines
8.0
Y at m=0.1
7.0
Y at m=0.2
6.0 Y at m=0.3
Y at m=0.4
Value of Y
5.0
Y at m=0.5
4.0
3.0
2.0
1.0
0.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
Value of X
13
2.4 USING EXCEL GRAPH TEMPLATES TO EASILY RECREATE PROFESSIONAL
LOOKING GRAPHS
Once you have created the graph in Figure 2.7, you can save it as a chart template. If you have to
plot a similar graph next time then you can simply reuse this EXCEL template. This will save
you a lot of time and effort. Follow the following steps below to learn to use templates.
Step 1: Go to the design Tab and select “Save as Template” on the right top corner as shown
below. Give a suitable name to your template say “Professional template1”.
Step 2: Next time you need to use the template you created, first select the data you want to plot
and plot it using suitable chart type.
14
Step 3: Next move your chart to a separate sheet. This will prevent legends being misplaced.
Step 4: Finally, change chart-type to your template using “change chart type” button. This will
give you the graph of the template you want. Note: you have to save the template in your own
drive if you are using a CE computer so that you can have copy of it with you.
15
2.5 PLOTTING MULTIPLE FUNCTIONS WITH VARYING MAGNITUDES (ADDING
A SECONDARY AXIS)
16
Figure 2.8 Showing the secondary axis option
400000 10.00
Qin(cfs)
350000 9.00
Qout(cfs)
8.00
300000 depth (ft)
Flow rate (Q in cfs)
7.00
250000 6.00 Height (ft)
200000 5.00
150000 4.00
3.00
100000
2.00
50000 1.00
0 0.00
0 2 4 6 8 10 12 14 16
Time (days)
17
Home work problems (week-1)
1) Do Exercise-1 and submit the final amortization table with the title showing: “Clement’s
Loan Amortization Table.” Use your name instead of Clement.
2) Prepare the new amortization table (also showing your name on cell A1) for a loan
amount of $30000, APR of 8% and a loan term of 8 years. . Print some key portion
(about a page or two) of the amortization table with neat formatting. What is the total
amount of interest you would pay to the bank over the 8-year loan period?
3) What is the difference between absolute cell addressing and relative cell addressing?
How is it implemented in EXCEL? Give three example problems (make up your own 3
simple examples) where you can use the following concepts when copying cells: a) fix
rows using fixed cells or using the $ sign, b) fix columns alone using the $ sign, c) fix
both columns and rows using two $ signs. Give real example problems (for example,
computation of area of multiple circles by fixing the value of PI is a good example for
question 3c).
4) Complete the above line graphing exercise and print a good, professional quality graph.
Modify the title like this: “Dr. Clement’s Multiple Lines.” Use your name, instead of
“Clement.”
5) Repeat the above problem for a fixed value of m=2 and for various values of intercept
c=0.5, 1. 1.5, 2, and 2.5. Plot the data and provide a printout of the final graphs with a
title showing your name.
6) Hydrographs are used by civil engineers to model rainfall-runoff processes. A simple
analytical model for describing a stream hydrograph after a rainfall event (i.e., increase in
stream flow as a function of time) can be described by the model: Q(t) = a * (t/b)^n *
exp[n- (n*t/b)], where a and b are constants known as model parameters, t is the time in
hrs, and Q is the flow in the stream in ft3/hr.
a) Use EXCEL to implement the above design equation and plot Q(t) for t ranging from 0
to 20 hours (with a step of every 0.25 hrs). Use n = 1, b=3 and generate four hydrographs
for a = 200,000; 300,000, 400,000, and 500,000. Plot all four graphs together (good
quality graphs) and comment on the shape of the graphs. What happens when we vary
the constant “a”? Does “a” represent any meaningful physical quantity?
b) Plot Q(t) for t ranging from 0 to 20 hours (step of every 0.25 hrs). Use n =1,
a=300,000 and generate four hydrographs for b = 1, 2, 3, and 5. Plot all four graphs
together (good quality graphs) and comment on the shape of the graphs. What happens
when we vary the constant “b”? Does “b” represent any meaningful physical quantity?
7) Seven different formulae are defined in cell B2: for Case-1) =A2*B1, Case-2) =
$A$2*B1, Case-3) =A2*$B$1, Case-4) $A2*B1, Case-5) A$2*B1, Case-6) A2*$B1,
and Case-7) A2*B$1
a) If we copied the formula across and down (to all the nine cells that are marked as “?”)
what will be the EXCEL formula in each of these nine cells for each case? Submit seven
spreadsheets (similar to the one below) with an appropriate formula in each cell.
b) If we copied the formula across and down, hand calculate the values in the nine cells
for each case. Submit seven spreadsheets with an appropriate value in each cell.
18
DO NOT USE EXCEL, DO IT BY HAND AND THEN CHECK YOUR
ANSWER USING EXCEL.
8. Come up with an example problem where you will plot some independent variable
(x values) against 2 or 3 dependent variables (y values) with one of them involving a
dissimilar magnitude. This is similar to the last plotting exercise (involving two
vertical axes) you did in the lab. You have to come up with your own data/problem
for a system, discuss the problem, provide the data, and prepare professional
looking plots that use a primary axis and a secondary axis.
19