Lab 3
Lab 3
Lab 3
LAB # 3
To demonstrate basic features of Microsoft Excel
Objectives
In this lab, you will learn how to enter and manipulate data in Excel
Microsoft Excel for creating tables, scatter plots, and completing data analysis.
Lab Exercise
Microsoft Excel is an electronic spreadsheet program that runs on a personal computer. As with a paper
spreadsheet, you can use Excel to organize your data into rows and columns and to perform mathematical
calculations.
Pre-Lab
An Excel spreadsheet contains one or more worksheets. Each worksheet contains a grid of cells. Related
worksheets are held together in a workbook. When you save a spreadsheet made in Excel it saves a workbook
regardless of how many worksheets it contains. An Excel workbook can hold a maximum of 1,048,576 rows
and 16,384 columns. A row goes left-to-right, a column goes up-and-down.
Page 1 of
Lab Experiment | 3
File Tab
When you want to create a new workbook, open one existing workbook, save current workbook, print a
workbook, close current workbook, get current excel file information (such as: size, Title, tags, Categories,
Related Dates, Related People) or others file-related operations.
Title Bar
The Title bar will show the current excel workbook titles.
Page 2 of
Lab Experiment | 3
Excel Ribbon
The excel ribbon is the most important area in MS/Microsoft Excel. The following tabs are shown on
the ribbon by default: File, Home, Insert, Page, Layout, Formulas, Data, Review.
There are different Groups and commands in each Tab. Such as: The Home tab contains “Clipboard”,
“Font”, “Alignment”, “Number”, “Styles”, “Cells”, “Editing” groups.
Status Bar
Excel status bar displays worksheet information that are selected, such as: Cell Mode (Ready, Enter,
Edit, point), Permission, Caps Lock, Num Lock, Scroll Lock, Page Number, Sum and so on.
You can customize the status bar, just right-click it, then click the options that you want to display.
Active Tab
By default, Excel will open with the Home tab active on the
Ribbon. Note how the Active tab has a white background, and
the Inactive tabs have the opposite.
Contextual Tabs
Contextual tabs are displayed when certain objects, such as an images and charts, are selected. They contain
additional options for modifying the object. Contextual tabs stand out because they are darker in color and are
located to the right of all the other tabs. As soon as we start being productive in the program, we will see
contextual tabs appear Basic Text Editing:
On each tab, the buttons are organized into Groups. The groups
have names, but the names are not clickable.
Page 3 of
Lab Experiment | 3
Note that some buttons have images on them and some have images and an arrow. The arrow indicates that
more information is needed to carry out the function of the button.
Excel Cursors
You will encounter many different cursor shapes while using Excel.
Workspace
Open Excel and locate the parts of the Excel window.
Page 4 of
Lab Experiment | 3
Page 5 of
Lab Experiment | 3
Three things can be entered into each cell: numbers, formulas and text.
To enter a number, simply type the number (i.e.: 467.2 or 312) and press enter.
To enter an equation, type “=” then the equation and press enter.
To enter text, simply type the text and hit enter.
Worksheets: The worksheets contained in the workbook are displayed at the bottom-left of the
screen. Click on a worksheet to view it.
Scroll Bars: Used to view other parts of a worksheet when the entire worksheet cannot fit on the
screen.
View Tools: See Status Bar next
Page 6 of
Lab Experiment | 3
The NUMBER tab is useful to change your data into currency or to select the number of
decimal places you want displayed.
Under the ALIGNMENT tab, “Wrap Text” can be useful to fit text in one cell
The FONT tab can change font.
The BORDER tab can put boarders around and between individual cells. You should always
pick this option before printing an excel file to make it readable.
The FILL tab lets you put a background color in the cells selected. This is useful if you want
to highlight a cell or selection of cells to make it easier to read.
In-Lab Task:
Task 01:
Page 7 of
Lab Experiment | 3
Click in cell A2. Type Item, and tap the Tab key to move to cell B2.
In cell B2, type Amount and tap the Tab key to move to cell C2.
In cell C2, type Comments.
Format Cells
Formatting can be applied to several cells at one time and can make the cells stand out from the rest of
the cells in the worksheet.
Select the A2 through C2 cell range by clicking cell A2, making sure the cursor is the selection
tool, and dragging across to cell C2. The selected cells should be highlighted - although the
first cell will not be so. Note the dark black border around the selected cells.
On the Home tab in the Font group, click the Bold button.
Change the font size to 12.
Find the Fill Color button in the Font group and click the list arrow. Select a light color from
the color choices.
Click in a clear cell to view the changes to this range of cells.
Resize Column
Note how the word Comments doesn’t seem to “fit” in the cell. To fix that, we need to widen the
column.
Click on the C at the top of the column to select the column. This is called the column label.
On the Home tab in the Cells group, click the Format button. Under Cell Size, choose AutoFit Column
Width.
Notice the word Comments now “fits” in the C Column.
Page 8 of
Lab Experiment | 3
Attempt to resize Column A using the point and double-click method. NOTE: This method will not
work if you are still in edit mode in A16 cell.
Type the numbers into the cells in Column B using the Enter key to commit your changes and move to
the next cell.
Click into C3 and type June 1st this goes to $825.
Click into C4 and type Look into new windows.
Click on cell C3 to select it Change “June” to “May”
Apply Currency Style Formatting
Since we are doing a budget, it would be nice to have the numbers in column B display in currency style rather
than just plain numbers. To do this:
Select column B by clicking on the letter B at the top of the column.
On the Home tab in the Number group, click the Accounting Number Format button.
Notice how all of the numbers now have dollar signs and two decimal places.
Click into cell B3 and observe the formula bar. Notice how the formula bar still says “800” (it doesn’t
have a dollar sign or decimal places). That’s because the formula bar shows what’s actually inside of a
cell. In our case, this cell contains a plain old number. But we are telling Excel to display this number in
our spreadsheet as currency.
Enter a Simple Formula
Next, we are going to examine several different ways to add the values in cells B3 through B10.
To let Excel, know that you are going to enter a formula, always start your formula with an equal =
sign. Click into B11 and type an = sign.
Now, click into cell B3. Notice how the cell name (B3) appears in B11 as if it was typed in and also a
color border is now around cell B3.
Page 9 of
Lab Experiment |
Next, type a + (plus) sign and then click in cell B4. Continue to type the + signs and click into the cells,
which will add the value that is in that cell, until you click into the last cell, B10. Do not type the + sign
after clicking in B10.
Check your formula for accuracy using Figure 4 on Handout 1. The formula should be:
=B3+B4+B5+B6+B7+B8+B9+B10
After writing formula press Enter to see the result, which should be $1340.00.
Use a Function
We are going to use a different method this time to add up the values in B3 through B10. We are going to use a
function, which in Excel is basically a pre-defined formula. The function name tells Excel what to execute. In
this case, we’re going to use a function called SUM.
Click the Undo button on the Quick Access Toolbar. Watch what happens to cell B11. The formula has
disappeared, so we can start again.
Type an = sign into cell B11. This lets Excel know that you are going to use a function, just as when
you are typing a formula.
Next, type SUM. As you type, note that a dropdown list appears with suggestions for which function
you might like to use.
Page 10 of
Lab Experiment |
Double-click the SUM entry. Click into the first cell in the range, which is B3. then Type a colon. After
that Click into the last cell in the range, which is B10. Press Enter.
Check your formula for accuracy – it should be =SUM (B3:B10)
AutoSum
AutoSum is a two-part button in the Editing group on the Home tab. It looks like the Greek letter Sigma. It is a
shortcut to the SUM function and does not require entering an = sign in the cell first.
The button has a list arrow with other functions and can be used to perform calculations quickly on a contiguous
set of numbers. The AutoSum button will give you all the components of a sum formula except for the range of
cells.
Click in B11 and tap the Delete key. Pressing this key clears the contents of the selected cell.
On the Home tab in the Editing group, click the AutoSum button (not the list arrow).
Note the selection of cells denoted by the “marching ants” and the formula that has been entered into
B11.
If the formula is correct, click the check mark on the formula bar.
Cell Referencing
A cell reference refers to the location or address of a cell. It tells Excel to make use of the value that is inside of
the cell that’s being referenced. Cell references are used in formulas, functions, charts, and other Excel
commands. When a cell reference is used in a formula or function, whenever that cell is updated, the result of
the formula or function will update as well.
We are going to use cell referencing to correct a weakness in our spreadsheet.
Click into cell B14.
Look in the formula bar to see that the number displayed is simply hard coded data. We based that data
entry on the sum of the Amount column that is displayed in B11. This was not a good strategy because
consider what would happen if one of the amounts in column B changed. Let’s try it.
In cell B9, type 200 and click the check mark on the formula bar.
Notice what happened to the total in B11. It updated accordingly. But what about our expenses amount
in B14?
Page 11 of
Lab Experiment |
Using a cell reference in cell B14 instead of typing in a value will force the value of this cell to be
recalculated whenever any of the referenced cells are changed.
o
Click in the cell B14 (no need to delete its contents)
o
Type a “=”.
o
Click on cell B11.
o
Click the check mark on the formula bar.
Adding Columns
Change the label in cell B2 from “Amount” to “Budget”.
Add a column between column B (Budget) and column C (Comments):
o
Select the column to the right of where you want the new
column to insert by pointing to the column label (A, B, C, e.g.)
and clicking on it. In this case, click on C.
o
On the Home tab in the Cells group, click on the Insert button (not on the list arrow).
Type Actual into cell C2.
Add another column called Difference between column C (Actual) and column D (Comments). Adjust
the column width so the word “Difference” fits inside of the column.
Page 12 of
Lab Experiment |
Using Figure below, type in the numbers in cells C3 to C10 (do not enter the dollar signs).
Copy a Formula from One Cell to Another
We have a formula in cell B11 that adds the numbers in the cells directly above it. We can copy that formula to
the C column (cell C11) rather than create the formula from scratch. This is accomplished using the Fill Handle
tool.
Click in cell B11. Take note that the formula bar reads =SUM (B3:B10).
Note the lower right corner of cell B11. There is a small black square. That is the fill handle.
Point your mouse at the fill handle until the cursor changes to a black cross.
To copy the formula in B11 to C11, maintain the black cross cursor shape as you left click the mouse
and, keeping the mouse button held down, drag to C11. Then let go of the mouse.
Page 13 of
Lab Experiment |
Click into C11 and note that in the formula bar the cell range has been changed to C3:C10.
What is ##
Sometimes when working with numbers and formulas, the column might be too narrow to display the value of
one or more cells. In these cases, you’ll see in the cell instead of the expected value. Let’s recreate that scenario,
and see how to quickly resolve the issue.
Point the cursor to the dividing line between the column C label and the column D label.
Keeping the cursor in that location, left-click and hold, then drag to the left to make column C about
half as wide as it was. Release the mouse button to resize the column.
Notice that the cell values in column C have changed from numbers to hash marks.
Now click into one of the cells in column C that now display as ###. Look in the Formula Bar and
notice that the value is still what you entered previously.
Resize column C again using any method, such as double-click, Autofit, or click-and-drag. Once the
column is wide enough, you’ll see the values display properly again.
Enter a New Formula and Copy to Other Cells
Using cell referencing, we are going to enter a formula in D3 to show the difference between what was
budgeted for Rent and what our actual expense was. After that, we will “fill” the formula down to Row 10.
In cell D3 enter =B3-C3. Remember to use cell referencing (clicking into a cell) instead of typing the
cell names. The minus (-) operator will need to be typed.
Find the Fill Handle (little black square) in D3, and using the Fill pointer (black cross) fill the formula
from D3 down to D10.
Using the same method, fill the formula in C11 to D11.
Adding Rows
We are going to add a couple of more categories of expenses, so we need more rows. To insert a row, you must
first select the row which is positioned beneath where you want the new row to go
Let’s insert a row above row 11 (TOTAL row).
o
Point to the row label (the 11) and click on it. The entire row will be selected. Notice the dark
black borders running all the way across the display.
o
Right click on the row label (the 11).
Page 14 of
Lab Experiment |
o
Click on Insert on the menu. Notice what happened. All the rows dropped down to insert
another blank row. The TOTAL row is now row 12.
o
Now, let’s populate the row with data.
o
In cell A11, type Insurance.
o
ii. Tab to B11 and type 50.
o
iii. Tab to C11. Notice how the displayed amount in cell B12 changes because the formula in
that cell updated to accommodate the addition of the new cell.
o
iv. In C11 type 50 and commit the content with the check mark. Notice the additional updating
that occurs in D11 and C12.
Insert another row above row 12.
o
In A12, type Loans.
o
Tab to B12 and type 75.
o
Tab to C12 and enter 75.
o
Commit the content with the check mark.
Note that the formulas in row 13 automatically updated the range to include the 2 extra rows that were
inserted.
Moving Rows and Columns
Inserting the two new rows resulted in the Miscellaneous row ending up towards the middle of the list of
expenses. Typically, a miscellaneous category appears at the end of a list. We are going to move the
Miscellaneous row so it is above the TOTAL row
Click on row 10 to select it (remember to click on the row label).
Leaving your cursor positioned on the 10, right click and select “Cut” from the menu.
Select row 13 (TOTAL).
Right click and select “Insert Cut Cells”.
Trace Errors
We have encountered Trace Errors after moving our Miscellaneous row above the Total row. Trace errors are
called out by green triangles in the cells containing errors. It is important to investigate any trace errors that
appear.
Page 15 of
Lab Experiment |
Finally, note how cell D13 does not have a green triangle. Click in the cell and check if the formula is
correct. It is not. Absent the Trace Error button, how would you update the formula to include the
additional rows? Ans: Fill the formula again from C13 to D13.
Using a formula to calculate our Savings
We have a goal to save $1500 for our vacation. Our Vacation Club takes equal amounts for 10 months
before returning it all with interest. Enter 150 into cell B17.
To find our Savings we need a formula that will total up the Vacation Club and the Expenses and then
subtract that total from the Income. We’re not going to use a built-in formula to do this. Instead, we’re
going to make our own.
In cell B18, using cell referencing, enter the formula =B15-B16-B17 which gives us the amount
remaining for savings.
Click the check mark on the formula bar to see the result. ($895.00).
Task 02:
Managing Worksheets
Thus far we have been doing all of our work in one worksheet of the workbook, namely, Sheet 1. See the
lower left portion of the Excel window; the “active” tab is Sheet 1.
At this point, our monthly budget spreadsheet can be used as a model for future months. Excel makes it easy
to duplicate data, formulas and formatting through the manipulation of worksheets. We are going to set this
workbook up so that we can keep track of our monthly budgets going forward.
First, we’ll create a template worksheet which has all the data and formulas that our current worksheet does,
except for data that will change from month to month, namely the Actual expenses data. The template
worksheet will be copied several times and each worksheet will have the name of a different month of the
year. As our bills come in, these amounts can be entered into the worksheet for each given month.
Copying a worksheet
Follow the steps to make a copy of Sheet 1.
In your My Budget.xlsx workbook, right click the Sheet
1 tab to bring up a menu.
Select “Move or Copy” from the menu.
Click in the checkbox next to “Create a Copy” and click
OK.
Note there is now a new worksheet that is exactly the
same as Sheet 1. The new worksheet’s name is Sheet
1 (2).
Renaming a worksheet
The new worksheet is going to become the template on which
we base future month’s budget worksheets. We’re going to give it a name and edit the data. The template will
not contain any data in the Actual column, but it will still retain formula(s) in that column. We will use copying
and renaming to set up worksheets for future months.
Let’s rename “Sheet 1 (2)”:
Page 16 of
Lab Experiment |
o
Right click the Sheet 1 (2) tab and click Rename on the menu.
o
The sheet tab is now in edit mode and you can type Template.
o
When you are done typing, tap Enter or click in a clear cell to get out of edit mode.
Switch to the Formulas view of the Template worksheet (key combination: Ctrl + ~ ).
Delete the “Actual” data (not the formula, just the data). Select cells C3:C12 and tap Delete on
keyboard (do not use the Delete key on the Number Pad).
Return to the Normal view of the worksheet (key combination: Ctrl + ~ ).
Rename “Sheet 1” to “January”.
Similarly Make 2 more copies of the Template sheet
Rename “Template (2)” to “February”. Rename “Template (3)” to “March”.
Moving worksheets
The order of the worksheet tabs can be manipulated by dragging them into position. In our case we want to
organize our worksheets from left to right starting with Template at the far left, then January, February, and
March.
Click the Template worksheet tab and hold the mouse button down as you move your mouse slightly
upwards. You will notice an image attaches itself to the cursor and a small black triangle appears. This
triangle is the drop point.
As you move your mouse with the mouse button still held down (dragging), the drop point will move.
When the drop point is where you want it to be, let go of the mouse and the tab will be in the new
location.
Click and drag the sheet tabs to put them in order left to right, Template through March.
Inserting worksheets
In preparation for the next section, we will need a new worksheet.
Look for the New Sheet button to the right of all the worksheet tabs.
Click the button to add a new worksheet.
3. Notice how it inserts the new worksheet to the right of the worksheet you were previously viewing.
Move the new worksheet to the end of the list
Page 17 of
Lab Experiment |
Page 18 of
Lab Experiment |
Click the tab for the Analysis worksheet. Click into cell A2. Click the Paste button itself (not the list
arrow) which is on the Home tab in the Clipboard group (or press Ctrl + V for Paste).
Use the fill handle to copy the reference from cell B2 to cell B11.
Using the same method, reference the actual cost of Clothing for Feb and fill it down:
o
Click in cell C2.
o
Type an =.
o
Click on the tab for the February worksheet.
o
Click into cell C3.
o
Click on the check mark.
o
Use the fill handle to copy the reference from cell C2 to cell C11.
Repeat the steps to reference actual figures for March.
Page 19 of
Lab Experiment |
empty row. Click on cell N12 and tap Delete to clear it.
Task 03:
Creating a Chart
Often a visual element can display data in a more meaningful and understandable way. We are going to insert
a chart to illustrate the Expenses and Savings section of our January worksheet (first worksheet created in
task 01). We will be selecting data for the chart and formatting sections of the chart to make it more
understandable.
Insert a chart
Click on the tab for the January worksheet.
Click in an empty cell in column G. G4 works well.
On the Insert tab, in the Charts group, click the Insert Pie or Doughnut Chart button. Click the 3-D Pie
style.
Notice the Chart Tools ribbon that opens up. It contains two contextual tabs: Design and Format.
Click in a clear cell and note the Chart Tools contextual ribbon disappears.
Click the chart to select it and the Chart Tools contextual ribbon comes back.
Select data for chart
Our chart looks blank because the data it refers to is in cell G4, and that cell had no data. On the
Design tab on the Chart Tools ribbon, locate the Data group, and click Select Data.
Page 20 of
Lab Experiment |
When the Select Data Source dialogue box prompts for a data range, on the worksheet, select cells
A15:B18 (unlike most dialogue boxes, this dialogue box lets us interact with our spreadsheet while the
dialogue box is open). Click OK
On the Chart Tools Design tab, in the Chart Layouts group, click the Add Chart Element button. Point
to Data Labels from the list, and then select More Data Label Options.
Page 21 of
Lab Experiment |
A Format Data Labels pane opens on the right. This allows us to customize the labels that appear on
our chart. Note that the chart will immediately update as we make our customizations.
o
Check Value. This causes the actual dollar amount to be displayed on the label
o
For Separator, select (New Line). This puts the percentage underneath the dollar value.
o
Check Outside End. This moves the labels so they are not covering up the chart.
o
Close the Format Data Labels pane by clicking the small X in the upper-right corner.
Post-Lab Task:
Page 22 of
Lab Experiment |
Lab Task: 01
Create worksheet with dummy data of 3 students as shown below, and then plot a graph.
Page 23 of