Excel Tutorial Mac F19
Excel Tutorial Mac F19
Object:
The object of this exercise is to learn how to use a spreadsheet program, specifically Microsoft
Excel, to analyze data collected in the laboratory and to create graphs for both analytical
purposes and for presentation of results.
In this tutorial you will learn:
• The basics features of the Excel spreadsheet
• To input data
• To perform calculations with your data using Excel
• To create a scatter plot graph of your results
• To create a trendline based on your graph and to display the equation for the trendline
• To format a graph in order to present your results
• To use the LINEST function to determine statistical information from linear data
Mac users can access the ‘right-click’ menus by using ‘secondary-click i.e. click with two
fingers.’
Background:
A spreadsheet is basically an electronic worksheet. Spreadsheet programs are used by many
different people for many different applications, including record keeping, calculations, statistical
analysis, data plotting, and financial analysis. As a chemistry student, you will find a spreadsheet
program is very useful in analyzing your experimental data and presenting your results. There are
many different spreadsheet programs. This tutorial will teach you how to use Microsoft Excel, as
it is available on all campus computers, and is widely used on both PCs and Macs. After today,
you are free to use the spreadsheet program of your choice.
Introduction to the Excel Spreadsheet
Take a few moments to acquaint yourself with the Excel workspace. When you first open Excel,
the program automatically opens a workbook. You will see a grid with rows and columns; this
grid is called a worksheet. A workbook can contain multiple worksheets. At the bottom left of
the program, you will see tabs labeled ‘Sheet1’, ‘Sheet2’ and ‘Sheet3’. You can use these tabs to
navigate between the worksheets in your workbook. You can rename a sheet by double-clicking
on the tab. Rename one of these sheets with an appropriate name. You can also rename the sheet
by right-clicking on the tab and selecting ‘Rename.’
Let’s explore the worksheet. Each rectangle in the grid is a cell. When you click on a cell, that
cell becomes active. The active cell is surrounded by a dark outline. Notice, the columns are
labeled with letters and the rows are labeled with numbers. The column and row headings for the
active cell are highlighted. You can navigate between cells using your mouse or the arrow keys.
Each cell is designated by the letter of its column and the number of its row. For example, cell
1
‘A1’ is the cell in the first row of column A. You will use the cell names when you perform
calculations on your data.
Directly above your worksheet, you will see two white boxes. The narrow box on the left is the
name box; it displays the name of the active cell. Click into a different cell and see the cell name
appear in the name box. The wider box to the left is the function bar. We will use the function
bar later in the exercise to perform calculations on data.
At the top of the program, notice the different tabs labeled ‘Home’, ‘Insert’, ‘Page Layout’, etc…
We will use the different tabs to access different features of Excel.
Begin by labeling the first three columns. In cell A1, type ‘Cylinder’; in cell B1, type ‘Height
(mm)’; in cell C1, type ‘Diameter (mm)’; and in cell D1, type ‘Mass (g).’ Now, input the data.
When you are finished entering data into a cell, you can press enter or you can click on the next
cell with your mouse/trackpad. If you make a mistake, you can click on the cell and re-type it
directly in the cell or you can edit it in the formula bar. If you would like to increase the widths
of the columns, you can do so several different ways.
If you need to enter very large or very small numbers using scientific notation, use the following
format: to enter 5.6 × 10–3 in Excel, type 5.6E–3.
2
Adjusting column width (row height)
Bring your mouse to the border of a column header (where it says “A” or “B”, etc..) directly above
your worksheet; when the mouse will appear as a double-sided arrow, click and drag the column
to the desired width. By double-clicking the mouse at the header border, the column will be
automatically adjusted to fit the widest entry in the column. You can adjust the column to a
specific width by right-clicking on the column header, and choosing ‘Column Width’ from the
drop-down menu. Row heights can be adjusted by these same methods.
At this point, your worksheet should look something like this:
Notice that Excel does not show trailing zeros that appear after a decimal place. You should have
typed ’40.30’ in cell B3, but it appears as ‘40.3’. Excel does not automatically determine the
correct number of significant figures. You will have to tell the program how many decimal places
you would like to be displayed. To do this, we will format the cells. Right click the column B
header and select ‘Format Cells’. A dialogue box will appear. From the menu on the left, select
‘Number,’ then choose 2 decimal places from the drop down menu. For your own data and
calculations in the future, you will have to decide how many decimal places are appropriate. For
very large or small numbers, you can format the cells to use scientific notation. You would choose
‘Scientific’ from the menu and choose the appropriate number of decimal places to show the
correct number of significant figures. Repeat this formatting for all data columns.
Calculations with Excel
It would be relatively quick to calculate the density of one cylinder. But to calculate the density
of all 6 would take awhile. In Excel, we can perform the same calculation many times very easily
and quickly.
1. Calculating the Volume and Density of the Cylinders
The goal in part 1 is to calculate the density of each cylinder in units of g/mL. Our first
step is to calculate the volume of the cylinders in units of cubic centimeters (cm3= mL).
The formula to calculate the volume of a cylinder is
3
V = π.r2.h Eq 1
where r is the radius of the base of the cylinder and h is the height of the cylinder. We have
data for height and for the diameter of the cylinder. Start by labeling columns F, G, H and
I: Height (cm), Radius (cm), Volume (mL) and Density (g/mL). Adjust the width of these
columns as you choose.
Since 1 mL = 1 cm3, the height data needs to be converted from mm to cm (1 cm = 10 mm).
To calculate the height of each cylinder in cm, we must divide the heights from column B
by 10. Every calculation in Excel starts with an equation sign ‘=.’ This signals to the
program that you are performing a calculation. In cell F2, type =B2/10 and hit return or
enter. Alternatively, you could type “=,” click on cell B2 and then type /10 with the same
result. Notice that we used ‘/’ for a division. Excel uses different symbols for some math
functions:
Math Operation Symbol Excel Operator Example
addition + + 2+3 = 5
subtraction - - 7–4 = 3
multiplication × * 2*3 = 6
division ÷ / 10/2 = 5
power superscript number ^ followed by power 3^2 = 9
You have just calculated the height of 1 cylinder in units of centimeters. To calculate the
height of all the cylinders in centimeters, you are going to autofill the cells below with the
equation. To do this, click on cell F2. At the bottom right of the highlighted cell, there is
small square. Bring your mouse on top of the square and your mouse symbol changes into
a plus sign. Click here and drag your mouse down until you reach cell F8. The autofill
function has copied the formula from cell F2 and used it to make the same calculation on
each of the values from column B. Excel will change the source cell for each autofilled
cell to keep the relationship the same, i.e. cell F6 now contains the formula =B6/10 instead
of =B2/10. Click on some of the autofilled cells to verify this action. A function in a cell
can also be copied and pasted into another cell using ‘Copy’ and ‘Paste.’ This is a useful
feature if you want to bring the function to a non-adjacent cell.
The radius is one-half the diameter. You need to calculate the radius of each cylinder in
units of centimeters. There are multiple ways to input this formula. You could divide by
10 or multiply by 0.1 to convert the unit; you could divide by 2 or multiply by 0.5 to half
the length. One possible formula could look like this ‘=C2/2/10.’ The value ‘1.1025’
should appear in cell G2. Use autofill to calculate each radius.
To calculate the volume, we are going to use equation 1 from above. In cell H2, enter the
formula =3.14159*F2*G2^2 and autofill the cells below.
Make sure columns F, G and H are displaying the correct number of significant figures by
formatting the cells to display the appropriate number of decimal places.
4
The density of a cylinder is given by the formula below:
𝐦𝐚𝐬𝐬
𝐝𝐞𝐧𝐬𝐢𝐭𝐲 = 𝐯𝐨𝐥𝐮𝐦𝐞 Eq 2
In cell I2, enter =D2/H2 and fill the cells below. Congratulations, you have just calculated
the density of each of the 7 aluminum cylinders! Don’t forget to format the cells to show
the correct number of significant figures.
You can perform multiple-step calculation in Excel just as you would with a calculator.
Just remember to follow the order of operations. For example, to calculate the density in
1 step:
𝑚𝑎𝑠𝑠
𝑑𝑒𝑛𝑠𝑖𝑡𝑦 = 2
ℎ𝑒𝑖𝑔ℎ𝑡 𝑖𝑛 𝑐𝑚 1 𝑑𝑖𝑎𝑚𝑒𝑡𝑒𝑟 𝑖𝑛 𝑐𝑚
𝜋×( ) × (2 ( ))
10 10
5
Now, we will calculate the standard deviation of the calculated densities by 2 methods.
The standard deviation is a measure of the precision of the data. Here is the formula for
standard deviation:
N
(x − x)
2
i
s= i
Eq 3
N−1
Where x1, x2, ….. xN are the calculated densities, 𝑥̅ is the average of these values and N is
the number of samples.
In the first method of calculating the standard deviation, we will begin solving for the
standard deviation by calculating the square of the deviation of each density from the mean.
Label column K: Deviation squared. In cell K2 enter =(I2-I13)^2and auto-fill the cells
below. Notice that the values in K3 and below are very different than the value in K2.
Click on one of these cells and look at the formula in the formula bar. In rows K2 – K8,
we want to change the density values for xi, but we want to use the same value of x̅ in each
row. To use the same cell (I3) in each calculation, we can instead use $I$13 in the formula.
Edit your formula in K2 to show =(I2-$I$13)^2 and auto-fill the cells below. The dollar
sign in front of the column will keep the column number the same during an autofill, and
the dollar sign in front of the row will do the same for the row. For this application, you
could have also used
=(I2-I$13)^2, since our current example doesn’t change the column during the autofill.
In cell K10, enter =SUM(K2:K8) to add together the deviations squared. Label this cell
SUM. There are 7 calculated densities, so (N-1) is 6. In cell K11, enter =(K10/6)^0.5, hit
return and label this the StDev1.
In the second method of calculating the standard deviation, we will use Excels STDEV
function. In cell K13, enter =STDEV(I2:I8) and hit return (if you have Excel 2010/2011
you can use the STDEV.S function). Label this cell StDev2. Your values of StDev1 and
StDev2 should be identical.
Congratulations! You now have the skills to perform basic calculations of your data in
Excel. There are many different functions available in Excel besides SUM, AVERAGE
and STDEV. You can search for other useful functions using the function tool, which
appears as an uppercase sigma (Σ) in the toolbar under the Home tab.