COMPROG-FUNDAMENTALS Module 3
COMPROG-FUNDAMENTALS Module 3
Getting Started
When you open MS Excel for the first time, a blank spreadsheet will appear (shown
below). In more recent versions however, the Excel Start Screen will appear instead,
allowing you to create a new workbook, choose a template, and access your recently
edited workbooks.
35
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
MS Excel’s interface is divided into two sections, the Application Window, and the
Workbook Window.
Application Window
The Application Window provides the space for your worksheets and workbook
elements such as charts. The components of the Application Window are described
below.
● The Quick Access Toolbar: The Quick Access Toolbar lets you access common
commands no matter which tab is selected. By default, it includes the Save, Undo,
and Repeat commands.
● The Ribbon: MS Excel uses a tabbed Ribbon system instead of traditional menus.
The Ribbon contains multiple tabs, each with several groups of commands. You
will use these tabs to perform the most common tasks in Excel.
● The Formula Bar: In the formula bar, you can enter or edit data, a formula, or a
function that will appear in a specific cell. In the image below, cell C1 is selected
and 1984 is entered into the formula bar. Note how the data appears in both the
formula bar and in cell C1.
● The Name Box: The Name box displays the location, or "name" of a selected cell.
In the image below, cell B4 is selected. Note that cell B4 is where column B and
row 4 intersect.
The Worksheet
Depending on the version of your MS Excel, whenever you create a new Excel
workbook, it will contain one or three worksheet(s) named Sheet1 (Sheet2 and Sheet3 if
you have three). A worksheet is a grid of columns and rows where columns are
36
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
designated by letters running across the top of the worksheet and rows are designated
by numbers running down the left side of the worksheet.
When working with a large amount of data, you can create multiple worksheets
to help organize your workbook and make it easier to find content. You can also group
worksheets to quickly add information to multiple worksheets at the same time.
● Renaming a worksheet:
1. Right-click the worksheet you wish to rename, then select Rename from the
worksheet menu.
2. Type the desired name for the worksheet.
3. Click anywhere outside of the worksheet, or press Enter on your keyboard. The
worksheet will be renamed.
● To insert a new worksheet:
37
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
2. The Move or Copy dialog box will appear. Choose where the sheet will appear
in the Before sheet: field. In our example, we'll choose (move to end) to place
the worksheet to the right of the existing worksheet
3. Check the box next to Create a copy, then click OK.
4. The worksheet will be copied. It will have the same title as the original worksheet,
as well as a version number.
● To move a worksheet
1. Select the worksheet you wish to move. The cursor will become a small
worksheet icon .
2. Hold and drag the mouse until a small black arrow appears above the desired
location.
3. Release the mouse. The worksheet will be moved.
Cell Addressing
Whenever you work with Excel, you'll enter information, or content, into cells. Cells
are the basic building blocks of a worksheet. You'll need to learn the basics of cells and
cell content to calculate, analyze, and organize data in Excel.
38
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Cell Basics
Every worksheet is made up of thousands of rectangles, which are called cells. A
cell is the intersection of a row and a column. Columns are identified by letters (A, B, C),
while rows are identified by numbers (1, 2, 3).
Each cell has its own name, or cell address, based on its column and row. In this
example, the selected cell intersects column C and row 5, so the cell address is C5. The
cell address will also appear in the Name box. Note that a cell's column and row
headings are highlighted when the cell is selected.
You can also select multiple cells at the same time. A group of cells is known as a
cell range. Rather than a single cell address, you will refer to a cell range using the cell
addresses of the first and last cells in the cell range, separated by a colon. In the images
below, two different cell ranges are selected:
39
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Selecting a Cell Range
1. Click, hold, and drag the mouse until all of the adjoining cells you wish to select
are highlighted.
2. Release the mouse to select the desired cell range. The cells will remain selected
until you click another cell in the worksheet.
Cell Content
Any information you enter into a spreadsheet will be stored in a cell. Each cell can
contain several different kinds of content, including text, formatting, formulas, and
functions.
● Text: Cells can contain text, such as letters, numbers, and dates.
● Formatting Attributes: Cells can contain formatting attributes that change the way
letters, numbers, and dates are displayed. For example, percentages can appear
as 0.15 or 15%. You can even change a cell's background color.
● Formulas and Functions: Cells can contain formulas and functions that calculate
cell values (More on these later).
Deleting Cells
Take note that if you delete the entire cell, the cells below it will shift up and
replace the deleted cells.
40
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
this method would be very time consuming. Instead, you can use the fill handle to quickly
copy and paste content to adjacent cells in the same row or column.
1. Select the cell(s) containing the content you wish to use. The fill handle will appear
as a small square in the bottom-right corner of the selected cell(s).
2. Click, hold, and drag the fill handle until all of the cells you wish to fill are selected.
3. Release the mouse to fill the selected cells.
Arithmetic Operations
Excel uses standard operators for formulas, such as a plus sign for addition (+), a
minus sign for subtraction (-), an asterisk for multiplication (*), a forward slash for division
(/), and a caret (^) for exponents.
Order of Operation
Excel calculates formulas based on the following order of operations:
1. Operations enclosed in parentheses.
2. Exponential calculations (3^2, for example).
3. Multiplication and division, whichever comes first.
4. Addition and subtraction, whichever comes first.
Cell References
While you can create simple formulas in Excel manually (for example, =2+2 or
=5*5), most of the time you will use cell addresses to create a formula. This is known as
making a cell reference. Using cell references will ensure that your formulas are always
accurate because you can change the value of referenced cells without having to
rewrite the formula.
41
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
By combining a mathematical operator with cell references, you can create a
variety of simple formulas in Excel. Formulas can also include a combination of cell
references and numbers, as in the examples below:
$A$2 The column and the row do not change when copied
A$2 The row does not change when copied
$A2 The column does not change when copied
Note: When writing a formula, you can press the F4 key on your keyboard to switch
between relative and absolute cell references. This is an easy way to quickly insert an
absolute reference.
For more information on Cell References, watch Module 3 Excel_ Relative and Absolute
Cell References
Functions
A function is a predefined formula that performs calculations using specific values
in a particular order. Excel includes many common functions that can be useful for
quickly finding the sum, average, count, maximum value, and minimum value for a range
of cells. In order to use functions correctly, you'll need to understand the different parts
of a function and how to create arguments to calculate values and cell references.
Parts of a Function
In order to work correctly, a function must be written a specific way, which is called
the syntax. The basic syntax for a function is an equal sign (=), the function name (SUM,
42
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
for example), and one or more arguments. Arguments contain the information you want
to calculate.
Arguments
Arguments can refer to both individual cells and cell ranges and must be enclosed
within parentheses. You can include one argument or multiple arguments, depending
on the syntax required for the function. For example, the function =AVERAGE(B1:B9)
would calculate the average of the values in the cell range B1:B9. This function contains
only one argument – that is, the cell range B1:B9.
43
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
EXPLORE
In this Excel worksheet we will be looking at what’s so different about weighted averages
as compared to non-weighted averages. For this activity we will look at a typical
student’s grade records for an entire year in one particular class. First, before we begin,
what is a weighted average? A teacher may hand out a syllabus with a grading policy
that looks like this:
TOTAL: 100%
This is a weighted average. One test is worth 10% of your grade while one quiz is
worth almost half of that.
Let’s look at what a grading policy might look like if nothing was weighted.
TOTAL: 100%
Each test, quiz, and homework assignment are all worth 6.25%. No one thing is
weighted as being more important than the rest.
2. Click on cell A1 then type “Test Scores (%) ” then on cell B1 “Weight %” and cell C1 “
“Weighted Scores (Test)”. Your initial worksheet should look like this;
44
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
3. Input the Test Scores as follows; 95, 85, 89 to cell A2,A3 and A4. Followed by the
individual weight % in column B. Note that each test is 10% of the grade.
The spreadsheet is split apart into two main sections. The first section which takes up
columns A, B, and C are the weighted averages. The second section, columns E and F,
are the non-weighted averages.
Column A shows all the student’s percentage scores he/she received on tests, quizzes,
homework assignments, and participation. Column B shows the percent that each test
or assignment was weighted. Column C will show the scores after they have been
weighted by the proper percentage.
Column F shows the percentage scores of the student’s grades without being weighted.
Column F is exactly the same as column A.
5. Make sure that the total weight % is equal to 100%. By using the SUM function, you can
easily compute for the total weight %. Because we are working with percentages, we
45
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
need to multiply the entire formula by 100. Note that you can also calculate it by using
the addition operator (=B1+B2+ … +B23) then multiply it with 100.
We used the SUM function, the syntax for this function is;
= SUM(number 1,[number2],{number3],...)
Note that the values can be numbers, cell references, cell range in any combination. In
our example above, we used a cell range (group of cells).
6. Move over to Column F. We need to get the average of the student’s scores in this
column. Click on cell F27.
The average function returns the average (arithmetic mean) of the arguments. For
example, if the range A1:A20 contains numbers, the formula =AVERAGE(A1:A20) returns
the average of those numbers.
SYNTAX:
46
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
● Number1 Required. The first number, cell reference, or range for which you want
the average.
● Number2, ... Optional. Additional numbers, cell references or ranges for which
you want the average, up to a maximum of 255.
7. On cell F27 enter the formula; =AVERAGE open parenthesis then click and drag from
cells F2 to F4 then enter a comma then click and drag from cells F7 to F11 then enter a
comma then click and drag from cells F14 to F20 then enter another comma. Click cell
F23 and end with parenthesis. It should look like this:
Hit enter. Cell F23 should now read an average score of about 91.31
8. Move over to Row C. We need to figure out what the weighted score is of each test
or assignment. Let’s compute for the product of Test Score % and Weight %. Click on
cell C2 then enter the formula, = (A2* B2). Note that in excel the asterisk(*) is the
operator used for multiplication.
47
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
9. With your mouse, move over the bottom right hand corner of cell C2 until a small black
plus sign appears. Click and drag down to cell C4. This will move the formula you typed
in for cell C2 down into the next two cells with the corresponding rows.
10. In cell C7, enter in the formula, =(A7*B7), then hit enter. Drag that formula down to
cell C11. In cell C14, enter in the formula, =(A14*B14), then hit enter. Drag that formula
down to cell C20. In cell C23, enter in the formula, =(A23*B23), then hit enter.
11. Click on cell C27 and enter in the formula, =SUM( then Click and drag from cells C2
to C4 then enter a comma. Then drag from cells C7 to C11 and enter a comma. Then
drag from cells C14 to C20 and enter a comma. Then click on cell C23 and end with
parenthesis. Hit enter.
48
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Commonly Used Functions (MS Excel Demo.xlsx)
49
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
= IF(logical_test, value_if_true, value_if_false) returns one value if the condition you
specify evaluates to true and another value if it evaluates to false
logical_test is any value or expression that can be evaluated to TRUE or
FALSE.
For example, A10=100 is a logical expression; if the value in cell A10 is equal to
100, the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE.
This argument can use any comparison calculation operator.
value_if_true is the value that is returned if logical_test is TRUE.
value_if_false is the value that is returned if logical_test is FALSE.
Text Functions
=LEFT(text, num_char)
You can use the Left function when you want to extract the leftmost characters from a
string. Similarly, you can also use the RIGHT function to extract the rightmost characters
from a string.
=PROPER (text)
Proper function in Excel capitalizes each word in the string that is, it converts the case
into proper case.
=TRIM(text)
Trim function in Excel removes the unnecessary spaces from a particular string.
=UPPER(Text )
Upper function in Excel converts the text into Upper case from lower case.
=CONCATENATE (text1, text2….)
Concatenate function in Excel helps to join the text of two or more cells.
Sorting Data
As you add more content to a worksheet, organizing that information becomes
especially important. You can quickly reorganize a worksheet by sorting your data. For
example, you could organize a list of contact information by last name. Content can be
sorted alphabetically, numerically, and in many other ways.
When sorting data, it's important to first decide if you would like the sort to apply
to the entire worksheet or just a cell range.
● Sort sheet organizes all of the data in your worksheet by one column.
● Sort range sorts the data in a range of cells, which can be helpful when working
with a sheet that contains several tables. Sorting a range will not affect other
content on the worksheet.
To sort a sheet:
50
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Filtering Data
If your worksheet contains a lot of content, it can be difficult to find information
quickly. Filters can be used to narrow down the data in your worksheet, allowing you to
view only the information you need. To filter data
1. In order for filtering to work correctly, your worksheet should include a header row,
which is used to identify the name of each column.
2. Select the Data tab, then click the Filter command.
3. A drop-down arrow will appear in the header cell for each column.
4. Click the drop-down arrow for the column you wish to filter.
5. The Filter menu will appear.
6. Uncheck the box next to Select All to quickly deselect all data.
7. Check the boxes next to the data you wish to filter, then click OK.
8. To remove all filters from your worksheet, click the Filter command on the Data
tab.
● Column charts use vertical bars to represent data. They can work with many
different types of data, but they're most frequently used for comparing
information.
● Line charts are ideal for showing trends. The data points are connected with lines,
making it easy to see whether values are increasing or decreasing over time.
● Pie charts make it easy to compare proportions. Each value is shown as a slice of
the pie, so it's easy to see which values make up the percentage of a whole.
● Bar charts work just like Column charts, but they use horizontal bars instead of
vertical bars.
● Area charts are similar to line charts, except that the areas under the lines are filled
in.
● Surface charts allow you to display data across a 3D landscape. They work best
with large data sets, allowing you to see a variety of information at the same time.
To insert a chart:
1. Select the cells you want to chart, including the column titles and row labels. These
cells will be the source data for the chart.
2. From the Insert tab, click the desired Chart command.
3. Choose the desired chart type from the drop-down menu.
4. The selected chart will be inserted in the worksheet.
51
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
● Excel allows you to add chart elements—such as chart titles, legends, and data
labels—to make your chart easier to read. To add a chart element, click the Add
Chart Element command on the Design tab, then choose the desired element
from the drop-down menu.
● To edit a chart element, like a chart title, simply double-click the placeholder and
begin typing.
● Excel also includes several different chart styles, which allow you to quickly modify
the look and feel of your chart. To change the chart style, select the desired style
from the Chart styles group.
● Sometimes you may want to change the way charts group your data. From the
Design tab, select the Switch Row/Column command.
● If you find that your data isn't well suited to a certain chart, it's easy to switch to a
new chart type. From the Design tab, click the Change Chart Type command.
The Change Chart Type dialog box will appear, then select the desired chart
● Whenever you insert a new chart, it will appear as an object on the same
worksheet that contains its source data. Alternatively, you can move the chart to
a new worksheet to help keep your data organized.
1. Select the chart you wish to move.
2. Click the Design tab, then select the Move Chart command.
3. The Move Chart dialog box will appear. Select the desired location for the
chart.
4. Click OK.
INSTRUCTION: Open the Excel Payroll.xlsx file and perform the given instructions.
References:
IF Function https://support.office.com/client/en-us/videoplayer/embed/RE285qJ?pid=ocpVideo0-
innerdiv-oneplayer&jsapi=true&postJsllMsg=true&maskLevel=20&market=en-us
52
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.