Empowerment Technologies Quarter 2 Module 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

11

EMPOWERMENT TECHNOLOGIES
Advanced Spreadsheet Skills

Quarter 2-Module 1
Let Us Learn!

At the end of this lesson, the students should be able to:


1. Familiarize the most commonly used functions in Microsoft Excel.
2. Use several conditional functions available in Microsoft Excel.
3. Use Microsoft Excel as a viable tool in market research and product
development.

Let Us Try!

Pre-Test
I. Multiple Choice: Encircle the letter that corresponds to the correct answer.
1. A program designed to create spreadsheets which can later be used to
analyze statistical data
a. Microsoft Excel c. Microsoft Publisher
b. Microsoft Word d. Microsoft OneNote
2. A number format that puts a dollar symbol before each value by default.
a. percent c. comma
b. accounting d. date/time
3. A function that adds a range of cells.
a. ADD c. SUM
b. PLUS d. TOTAL
4. This is the tab of the format cells dialog box where you can change the
orientation of a text.
a. alignment c. file
b. orientation d. view
5. A function that gets the average of a range of cells.
a. AVERAGE c. MEAN
b. SUM d. MEDIAN
6. A function used to count the number of cells that contains something
in them if the criteria are not met.
a. COUNT c. COUNTING
b. COUNTNOW d. COUNTIF
7. Which among the following is not part of the syntax for AVERAGEIF?
a. average range c. logical test
b. range d. criteria
8. A function used to add a certain range of cells if a condition is met.
a. SUMIF c. TOTALIF
b. ADDIF d. PLUSIF
9. The shortcut key for the Format Cells dialog box.
a. Ctrl + F c. Ctrl+1
b. Shift + F d. Alt+1
10. A syntax in the AVERAGEIF function that includes the value or label
that determines if the cell is part of the range to be averaged.
a. Range c. Average Range
b. Criteria d. Logical Test

1
II. Briefly explain the following questions:

1. What is spreadsheet and its application?


_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_________
2. What are the examples of spreadsheet?
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_________
3. How do you create spreadsheet?
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_________

Let Us Study

Microsoft Excel
Introduction
A spreadsheet is a software program you use to easily perform
mathematical calculations on statistical data and totaling long columns of
numbers or determining percentages and averages.
And if any of the raw numbers you put into your spreadsheet should
change – like if you obtain final figures to substitute for preliminary ones for
example – the spreadsheet will update all the calculations you’ve performed
based on the new numbers.
You also can use a spreadsheet to generate data visualizations like
charts to display the statistical information you’ve compiled on a website. This
tutorial will focus on the use of the free application Google Spreadsheets. To
use Google Spreadsheets, you will need to sign up for a free Google account.
There are other spreadsheet software you can purchase, like Microsoft Excel.
While this tutorial will focus primarily on Google Spreadsheet, most of its
lessons will be applicable to any spreadsheet software, including Excel.

Spreadsheet Layout
To create a new spreadsheet in Google Spreadsheet, sign into
your Google Drive account. Then click on the New button on the top left and
select Google Sheets.

2
On your screen will appear a basic spreadsheet, divided into
numbered rows and lettered columns.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

The rows and columns intersect to create small boxes, which are
called cells. Each cell is identified by its column letter and row number.
Thus, the very first cell in the upper left-hand corner is called A1. Just below
A1 is A2. Just to the right of A1 is B1. Just below B1 is B2, and so on. In the
image below, for example, cell D9 is highlighted.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Setting the View Options


You can select some settings to change the view of the spreadsheet or
display toolbars you frequently use, such as the one for entering formulas to
make calculations.

To do this, in the menu at the top click on View and make sure there’s
a check mark next to Show Formula Bar (to display a box to enter formulas).

3
Entering Information in a Cell

You enter information into a spreadsheet program by typing it into each of the
cells.

You can enter three different types of information into a cell:

• Numbers – so you then can perform mathematical calculations on


them.
• Text – to identify what the numbers in the columns and rows represent,
usually by typing headings across the top of the columns or on the left
edge of the rows
• Formulas – to perform calculations on the numbers in a column or a
row of cells.

To enter information into a cell, simply click on the cell and type in the
information.

When you’re done, you can either press the enter/return key, which will
take you down to the next cell, or the tab key, which will advanced to the cell
to the right.

Each time you type information into a cell, you’ll notice the information
also appears in the Formula bar, the box just above the columns and rows.

For example, if you click on cell:

B3

And type in the number:

100

You’ll see the number 100 displayed in the formula bar above.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

4
Text Headings

To enter text headings for the various columns and rows to identify
them, follow the same procedure as you would with entering numbers. Click
on the cell, type in the name of a heading and press the enter/return key.

You can also “freeze” this header row, so it stays in the same place, even
if you scroll down a long spreadsheet. To do this, grab the small bar in the
corner of the spreadsheet area, and drag it down one row.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Importing Data into a Spreadsheet

Many government agencies and private organizations provide data on


their websites in a spreadsheet or other format that you can download onto
your computer.

To import a spreadsheet, .csv or other file you’ve downloaded on your


computer into a Google Spreadsheets, first create a new spreadsheet in Google
Docs. Then in the menu at the top click on File … Import and
then Browse and select the downloaded file.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

5
Importing Sample Data

Let’s download some data to demonstrate how to import it into a Google


Docs spreadsheet, and also to give us some sample data to use to show how
to do calculations and use other features of a spreadsheet.

The FBI compiles national crime statistics, including data on the types
of weapons used in homicides.

This data is in an Excel spreadsheet (.xls) file that can be downloaded


from the FBI website and then imported into a Google Doc spreadsheet.

To download the file, go to this FBI web page:

Expanded Homicide Data Table 8 (2010-2014)

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

The file will be downloaded onto your computer. (if for some reason you
have trouble downloading this file, you can click here to download the file
from our website). To import the file into a Google Docs spreadsheet, create a
new spreadsheet and in the menu at the top click on:

File…Import

Click on the Browse button and navigate to the downloaded FBI file
which is named expanded_homicide_data_table_8_murder_victims_by
_weapon_2010-2014.xls. Google Spreadsheet also allows you to import data
from your Google Drive. It may give you an option to replace existing data, or
to create a new sheet. Choose the best option for your situation.

6
After a few seconds you should see a Google Docs spreadsheet that
looks like this:

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

This spreadsheet shows the number of murder victims in each year


from 2004 to 2008 in five columns, with the columns labeled by year in cells
B4 to F4. Below that the spreadsheet shows the weapon used in the murders
in 18 rows of data, with the rows labeled by type of weapon in cells A5 (which
is the overall total for all weapons) to A22.

Resizing Columns or Rows

You can improve the display of the data in a spreadsheet by increasing


or decreasing the width of a column or the height of a row. To change a
column’s width, in the gray bar at the top of the spreadsheet where the letters
of the columns are displayed, move your mouse cursor to the border between
any two columns.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

7
Note for Excel: if you narrow the width of a column displaying a
number too much, you will see a series of pound signs displayed in the cell:
###
This doesn’t mean you’ve lost any data – you just made the column
width too narrow to fit some of the numbers in the cells in that column. You
can also speed up the resizing of columns and avoid making them too narrow
by moving your mouse cursor to the border separating two columns in the
gray bar at the top and double-clicking on the border. This will automatically
resize the column to the left, making it just wide enough to fit the longest
entry on any row in that column.

Deleting or Adding Columns or Rows

You can get rid of unwanted data or other information by deleting


rows or columns. For example, in our sample spreadsheet of weapons used
in homicides, we might want to get rid of row 23, which is just a footnote
stating that one murder in which the victim was pushed to his/her death
has been included in the “Personal weapons” listing in row 14.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

To delete a row, hover your mouse cursor over a row number in the gray
area to the left, in this case row 23. Right click and in the pop-up menu
select Delete row. Use the same procedure for deleting a column.

Hover your mouse cursor over a column letter in the gray area at the
top, right click and in the Pop-Up menu, select Delete column (you also can
click on the tiny downward-pointing arrow to get this pop-up menu).

8
If you want to add a column or row, again hover your mouse cursor over
the appropriate column or row in the gray area above or to the left, right click
and in the Pop-Up menu select one of the Insert options.

Formulas – Adding, Subtracting, Multiplying and Dividing

With a spreadsheet you can insert a formula that will instantly add,
subtract, multiply or divide numbers in columns or rows. To do this you select
a cell in a new column or row and then type in a formula. A formula starts
with an equals sign (=) that tells the spreadsheet you want to do a calculation.

A formula then has a symbol for what kind of calculation you want to perform
(add, subtract, multiply, divide, etc.). The symbols
a spreadsheet uses for calculations are:

o Plus sign (+) for adding one number to


another
o Minus sign (-) for subtracting one number
from another
o Asterisk (*) for multiplying one number by
another
o Backslash (/) for dividing one number by
another

Then you type in the letters/numbers for the cells (A1, A2, B1, B2, etc.) to
which you want to apply the calculation, separated by the symbol for the type
of calculation.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Adding Numbers in Columns

Let’s write a formula for adding together a series of numbers. In the


spreadsheet for types of weapons used in murders that we downloaded from
the FBI website, the spreadsheet already included the total number of
homicides in which any kind of firearm was used each year from 2004 to
2008. Those numbers are in row 6.

9
But what if these totals hadn’t been included in the original data and
you needed to calculate them yourself using the spreadsheet (or if you wanted
to use the spreadsheet to double-check the FBI’s calculations).

This would require totaling up for each year the column of numbers for the
five weapon types in the spreadsheet:

• Handguns – row 7
• Rifles – row 8
• Shotguns – row 9
• Other guns – row 10
• Firearms, type not stated – row 11

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

To do this we need to insert a formula for adding a series of numbers in


a column. Let’s start by doing this for the year 2004. Click on cell:

B23

Which is in the column that shows the numbers for weapons used in
2004.In that cell, type:

=B7+B8+B9+B10+B11

(note: the letters are not case sensitive. So, for example so you could
type in either B7 or b7).

This tells the spreadsheet to add up the number of murders committed


with handguns (B7), rifles (B8), shotguns (B9), other guns (B10), and firearms,
type not stated (B11) for the year 2004.

10
source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

You should type cell letters/numbers into a formula rather than the
actual numbers. That way if the numbers ever change (for example, if the FBI
released updated murder weapon statistics for 2008), you won’t have to re-
enter the new numbers in the formula. Instead, you’d just type the updated
numbers into the appropriate cells and the spreadsheet will apply the existing
formula to the new numbers in those cells.

Applying a Formula to Multiple Cells

If we now wanted to calculate the total number of gun related homicides


for the other four years, we could repeat the process of typing an addition
formula into each cell in the rest of row 23. But a spreadsheet has a much
faster way of accomplishing this – by letting you simply copy the formula to
one or more of the other cells in the same row.

To do this, click on cell:

B23

Where we typed in our addition formula

=B7+B8+B9+B10+B11

11
Pass your mouse cursor over the bottom right corner of cell B23 and notice
your cursor changes from an arrow pointer to a thin crosshair.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Click on that crosshairs, hold down your mouse button


and drag your mouse to the right over the rest of the cells in row 23.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

An outline will appear around the cells you’ve selected. Continue


dragging your mouse until you get to cell:

F23

Release your mouse button and the total number of homicides involving
firearms for each year from 2010 to 2014 will appear in row 23.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Which again confirms the totals in the original FBI spreadsheet in row
6. The spreadsheet has calculated these totals for you by applying the formula
you first typed in cell B23 to the rest of the cells in row 23.

The spreadsheet keeps the formula (addition) the same, but shifts the
cell numbers as it applies the formula to the other cells to the right (so the
formula in cell C23 is =C7+C8+C9+C10+C11, the formula in
cell D23 is =D7+D8+D9+D10+D11, and so on).

12
Editing a Formula

When you type a formula into a cell and then hit the enter/return key,
the formula will disappear, replaced by a number that’s the result of the
calculation.

So how can you edit the formula?

There are two ways:

You can double click on the cell to display the formula in the cell and
then edit or retype it there. Or you can click once on a cell and use
the Formula bar above to edit it.

If you click once on a cell that has a formula hidden in it (replaced by


a number that’s the result of the calculation), the formula you originally
typed will appear in the Formula bar above the columns and rows.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

To edit the formula, you can click in the formula bar where the formula
for this cell is displayed. Then change the existing formula or type a new one
into the Formula bar, press the enter/return key and the new formula will be
applied and the numbers will be recalculated in the cell.

Understanding Cell Formats

Cells can display their data in many different ways. For example, you
can format a cell to display data as currency, as a date, scientific notation, or
several other formats. You can adjust this by highlighting a cell, and changing
its format under the Format -> Number menu.

13
source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

This can sometimes be counter-intuitive because the cell can appear


differently than the data that’s actually in the cell. For example, in the
case of currency format, the cell data could have several decimal places. But
when formatting for currency, a dollar symbol will display and the cell will
only show the hundredths place (2 decimal points), even if the actual data in
the cell has is more exact and has more decimal points.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

The way to understand what the actual data is in a cell is to look at


the formula bar. This will sometimes show you the raw data. The cell format
is generally used to make thing more human-readable. But sometimes this
can be the cause of consternation, especially when using formulas. This could
especially be tricky when using dates.

Percent Changes and Multiplying and Dividing

This next section will describe how to calculate a percent


change between two numbers. A percent change is calculated by finding the
difference between the two numbers, and comparing that difference by the

14
first number. In our spreadsheet on murder weapons, we can calculate how
much each weapon increased or decreased between 2010 to 2014.

First click on cell G5 to the right of our existing data.

Type in the following formula:

+(F5-B5)/B5

Now let’s do the percent calculation, starting with the percent change in the
total number of homicides (row 5).

First click on cell H5 to the right.

And type in the following formula:

=(F5-B5)/B5*100

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

This is the formula for calculating the percent change between two
numbers. This formula tells the spreadsheet to find the difference of
homicides by subtracting the total homicides in 2014 from 2010. After that,
divides the results to the original value.

The backslash ( / ) is the symbol for dividing, while the asterisk ( * )


is the symbol for multiplying.

(Note: The parentheses in this formula are also important to define the correct
order of operations.)

Now hit the enter/return key to see the final result of the percent
formula in cell G5:

-0.09138559708

The total number of homicides by all types of weapons declined by 9.1


percent from 2010 to 2014. But to make it into a more human-readable
format, we can change the data format of the cell to a percentage.

15
source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Now it will display as:

-9.14%

Apply to the rest of the cells


Now let’s apply this percent change formula to the rest of the murder-by-
weapon numbers. Click on cell:

G5

Pass your mouse over the bottom right corner of the cell until the cursor
changes to thin crosshairs.

Click and drag the mouse cursor down over the rest of the cells in the H
column. Release your mouse button when you get to cell:

G22

The percent changes for all the different types of weapons used in homicides
will appear on your screen.

16
source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Parentheses in a Formula
In the formula for percent change we used in the previous section,
parentheses ( ) were included in the formula:

=(F5-B5)/B5

The parentheses in this formula are very important. These tell the
spreadsheet to subtract the number of homicides in 2010 (B5) from the
number of homicides in 2014 (F5) first, and then divide that amount by the
number of homicides in 2010 (B5).

If you didn’t include the parentheses and had just typed in =F5-B5/B5,
the spreadsheet first would divide B5 by B5 (yielding 1). Finally, it would
subtract the result from F5, resulting in an incorrect number.

So, if you are doing a calculation involving several steps, it is important


to include parentheses so you can group the numbers properly and the
spreadsheet thus knows the order in which to do the calculations.

Using Formulas with a Fixed Cell

Another feature you can do with a spreadsheet is building a formula


with a fixed cell, so that when you drag your formula to apply them to other
cells, it doesn’t automatically switch its reference to a new cell.

In our spreadsheet, for example, we might want to know what


percentage of homicides involved each different type of weapon compared to

17
a specific year. We would compare each cell to the total number of homicides
for only that year, so we don’t want the reference to that year’s total to change.

Let’s start with 2014. To create our percent formula, click on cell:

H6

And type in this formula:

=F6/F5

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

This formula tells the spreadsheet to divide the number of homicides


involving firearms in 2010 (F6) by the total number of homicides that year
(F5). Press the enter/return key and switch the cell format to percentage.
You’ll see the total is:

67.92%

So, firearm related homicides were about two thirds of the total number
of homicides in 2014. Good… so far. But, you might then try to apply this
same formula to the cells for the other types of weapons by dragging the
crosshairs, as we did in the previous example. But if you tried this, it would
produce bizarre numbers in the G column, including that some weapons-
related homicides are more than 100% of the total.

18
source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

What went wrong?

The problem is that when the spreadsheet copies a formula using this
method, it shifts the letters for both cells in the original formula (F6 and
F5) as it applies that formula to other cells (resulting in F7 divided by F6 in
the next cell down). To fix this, we need to force the spreadsheet to always
divide the numbers for each type of weapon used by a constant number – the
total number of homicides in cell F5. This is called anchoring the cell in our
formula, and force the spreadsheet always to use one cell each time.

You accomplish this by adding some $ signs to the formula that


instruct the spreadsheet not to change cell F5 when applying the formula to
other cells. So, go back and click on cell:

F6

Delete that formula (press delete key), and instead type in this:

=F6/$F$5

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

19
The dollar signs tell Excel to always keep anchored on cell F5 and the
data in it when applying this formula to other cells. Now we can drag the
formula down through the column of cells and get the correct results.

So, hover your mouse over cell:

F6

Then click on the crosshairs in the bottom right corner of the cell and
drag down to cell:

F22

And release your mouse.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

The correct percentage figure for each weapon type will now appear in
the spreadsheet.

Adding Numbers Using the SUM Formula

If you want to add a large group of numbers in a row or column, there’s


another way to do that quickly in a spreadsheet by using the SUM formula.

For example, in our example spreadsheet on weapons used in


homicides, what if you wanted to know the total number of homicides in
which did not include a firearm? To calculate that, you could add up the
numbers in rows 12 to 21 for each year using the SUM formula.

(Note: row 22 – “Other weapons or weapons not stated” – may or may not
involve a non-firearm-related homicide, so we’re leaving that out of this
calculation)

20
To use the SUM formula to calculate the number of non-firearm-related
homicides in rows 12 to 21, first click on cell:

B23

In that cell type this formula

=SUM(B12:B21)

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

You’ll see there were 3,418 non-firearm-related homicides in 2014. In


our formula, =SUM() is shorthand for telling a spreadsheet to add up a series
of numbers.

After typing =SUM, you type a set of parentheses, and inside the
parenthesis you will include something called a range.

A range has two cell references separated by a colon. B12:B21. Ranges


can even span multiple row or multiple columns, and can be used in
numerous formulas.

Adding selected cells with the SUM formula instead of a range

You also can add up select numbers in a column, rather than a span of
them, using the SUM formula. To do that, in the SUM formula you replace the
colon with commas to separate the specific cells you want to total up. Thus
if you wanted to total up only the number of homicides in 2014 in which either
poison (cell B15) or narcotics (cell B18) was involved, you would type this
formula.
21
=SUM(B15,B18)

Shortcuts to Writing Formulas

There are a number of shortcuts for writing formulas in a spreadsheet.


To illustrate these, in our spreadsheet on types of weapons used in homicides,
let’s add up the total number of firearm-related homicides from 2010 to 2014.
This would mean adding cells B6 through F6. We could manually type in
the =SUM(B6:F6) formula, but there is a more user-friendly tool for doing this
without having to remember formulas.

To do this, first click on cell:

I6

Then use the spreadsheet’s Formulas tool that will shorten what you have to
type.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Click on it and you’ll see a series of formulas you can select to insert
into your spreadsheet.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

In this case pick SUM and the formula =SUM() will be inserted into
cell G6.Now you can click the cells you want to be referenced, and they will
be auto-populated into the formula. You can click-and-drag to specify a range,
or click and hold down the shift key and click another cell. To specify specific
cells to add without making it a range, you should hold down the command
key (Mac) or Control key (PC) and click all the cells you want.

22
source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Averaging Numbers

Another common calculation is averaging a series of numbers. In our


spreadsheet on the types of weapons used in homicides, for example, what if
we wanted to know the average number of firearm-related homicides each
year between 2010 and 2014 (cells B6 to F6).

To do this, click on cell:

J6

And in that cell type:

=AVERAGE(B6:F6)

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

This same process can be used to also calculate


the MEDIAN(), MODE(), STDEV() (standard deviation) and other statistical
functions for a series of data points.

Using Functions to Import Website Data

One advantage to Google spreadsheets is that it is designed to work


with the Web. Specific functions allow you to load data dynamically directly
from a website.

Import a data file published on the Web into your spreadsheet

CSV files (comma separated values) can be imported directly into a


spreadsheet from anywhere on the Web. CSV is one of the most common data
formats and can be found with a simple Google search.

23
For sample data, we will use a piece of crime data from UC Berkeley in
2015 hosted on Github. The url is https://raw.githubusercontent.com/jrue/
ucpdcrime/master/data/ucpd/ucpd_data_6.csv.
Let’s import this data into a new sheet. Click the small plus button at
the bottom of our workbook document:

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Click in cell A1 and type (or copy-and-paste) the following:


=ImportData("https://raw.githubusercontent.com/jrue/ucpd-
crime/master/data/ucpd/ucpd_data_6.csv")

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

After a moment the data will load and should look like this:

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Many files will not be this clean and may require cleanup. But if you
can use the file as is, it’s especially useful. Governments regularly update CSV
files on their servers. This may happen frequently with certain files such as
election results.

24
Adjusting Data Display by Changing Cell Formats

In the previous example, you might have noticed the date and time
columns display these strange numbers which should be dates and times of
each crime. Raw cell data for a time value is the number of days since Jan 1,
1900 (and may even be different when using Microsoft Excel).

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

We can easily adjust this by changing the cell format. Click on the
column’s heading, then under the Format menu, select Date for the first
column, and a Time for the second column.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Import a table or list directly from a Web page

Tables can frequently be imported directly from a Web page into a


spreadsheet. Let’s import the same data from the Wikipedia’s page on Gun
Violence by State.
Note: This example will tie into the next section on charts, so we use it for
convenience. However, we do not advocate using data from Wikipedia in any

25
production sense. Always vet and corroborate data directly from the source
when used in journalism.
Open a new sheet and click in cell A1. Type:
=IMPORTHTML("https://en.wikipedia.org/wiki/Gun_violence_in_the_United
_States_by_state", "table", 1)
The first parameter is the webpage Google will scan (make sure it’s in
quotes). The second parameter is the HTML element it’s looking for. In our
case, we want it to find a <table> element. The third parameter is which table
element we should find, in case there are multiple. You may need to change
the third parameter through trial-and-error, or look at the source code of the
webpage you’re scrapping.
Hit enter and the spreadsheet should look like this:

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

The “table” parameter can be replaced with “list” so that it will look
for the contents of <ul><ol> and <dl> tags.

Load Dynamic Financial Data

Live data from Google finance can be imported into your spreadsheet.
The data updates automatically every time the spreadsheet is loaded. Quotes
can have up to a 20 minute delay, which is common for financial data.
Create a new spreadsheet that looks like this:

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Type =GoogleFinance(".DJI", "price") in cell B2


Type =GoogleFinance(".INX", "price") in cell B3
Type =GoogleFinance(".IXIC", "price") in cell B4

26
The initials at the beginning of the parentheses are stock ticker symbols. You
can find the symbol for any stock at Google Finance. The cells should update
in a few moments and your spreadsheet should look like this:

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Load historic financial data

The same function can be used to load historic data. Let’s pull in the
daily closing price of Google stock for 2009.
Create a new spreadsheet.
In cell A1, type:
=GoogleFinance("GOOG", "close", "01/01/2009" , "12/31/2009", "DAILY")Hit
enter and the daily closes for 2009 should load into your spreadsheet. The
full documentation on all of the different parameters for the Google Finance
function are listed on Google’s help pages.

Sorting Results

After you’ve entered numbers or done calculations in a spreadsheet,


you may want to sort the results from highest to lowest or lowest to highest.
With the spreadsheet on types of weapons used in homicides, for
example, you could more easily see which weapons are most frequently used
by ranking them from the highest number to the lowest number for any given
year.
To do this, you first need to highlight the area of the spreadsheet that
you want to sort. Don’t just highlight a whole column of numbers to
sort because the spreadsheet then will sort only the cells in that column and
not change the order of the corresponding cells in other columns (such as the
headings that tell you which type of weapon corresponds with the numbers of
homicides).

27
source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

The highlighted area now includes the headings for the types of
weapons used and then the numbers for each type of weapon for each year.
To sort the data, in the menu at the top, click on Data … Sort Range

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

In the box that appears, you’ll see the range of selected cells displayed
at the top (in this case, cells A5 to F22).

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

28
You now can select the column by which you want to sort the data.You
also can select whether to sort that data in ascending order (A – Z) so the
smallest number appears at the top of the sorted data, or descending order (Z
– A) so the largest number appears at the top.

Formatting Cells

A spreadsheet provides a lot of options for re-formatting the information


being displayed. These are similar to the options in a word processing program
like Microsoft Word or many other applications. They include:
• Changing the font size or style
• Defining the format for the kind of data in a cell, such as dates, times,
currency or percent
• Changing the number of decimal places displayed in a number
• Changing the text color or the background color
• Adding borders around the cells
Some of these options are available by selecting Format in the menu at the
top and then picking one of the choices in the drop-down menu.
Or you can click on the icons in the middle of the toolbar for other options.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

SumIF(), CoutIF(), AverageIF()

Excel's SUMIF() and COUNTIF() are two of my favorite summarizing


functions and we've talked about both frequently in this blog. What we haven't
discussed is how to return a conditional average. For instance, using the
simple sheet below, you could easily determine the average transaction using
=AVERAGE() to evaluate the data in column C.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

Now let's suppose you need to summarize that data by calculating the
average number of units sold per region. Let's look at a couple of ways to
return such a conditional average. Depending on your needs, you could use

29
SUMIF() and COUNTIF() to return additional summary information and build
on that.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

First, you'd enter the criteria. In this case, that's a unique list of the
regions (E3:E8). Next, you'd start summarizing:
F3: =SUMIF($B$2:$B$13,$E3,$C$2:$C$13)
G3: =COUNTIF($B$2:$B$13,$E3)
H3: =F3/G3
Then, you'd copy F3:H3 to create the summary range (F3:H8). Both
functions use the text in column E as the criteria. The SUMIF() function
returns the total sold per region; COUNTIF() returns the total transactions per
region. The simple expression, F3/G3, used in column H returns the average
sold per region. In other words, there were 3 transactions made in the
Frankfort region for a total of 244 units sold. The average Frankfort sale is
81.3 units.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

First, you'd enter the criteria. In this case, that's a unique list of the
regions (E3:E8). Next, you'd start summarizing:
F3: =SUMIF($B$2:$B$13,$E3,$C$2:$C$13)
G3: =COUNTIF($B$2:$B$13,$E3)

30
H3: =F3/G3
The helper functions are a nice touch as they supply additional
information that you might need. But, you could use the AVERAGEIF() to
return the same information. Excel's AVERAGEIF() function uses the same
logic and syntax as the SUMIF() and COUNTIF() functions. AVERAGEIF()
returns the average of the values within a specific range that meet a specific
condition.

source: https://multimedia.journalism.berkeley.edu/tutorials/spreadsheets/

This function uses the following syntax:


AVERAGEIF(range, criteria, [avgrange])

Where range identifies the cells that must


meet criteria, and average identifies the cells you want to average. This
function ignores Boolean values and empty cells.
Whether you use a simple expression or AVERAGEIF () doesn't matter.
Neither solution shown is superior (or faster) than the other. In addition, don't
forget about Excel's pivot table feature - if you don't mind losing the detail
records, a pivot table is a quick way to summarize data.

Let Us Practice

Procedure:
1.Open Microsoft Excel.
2. Create new worksheet.
3. Rename the worksheet to SIMPLE OPERATION.
4. Hide Columns D-F.
5. Insert the following: W/Tax, SSS, PAG-IBIG, Total Deductions and Net
Salary.
6. Find the W/Tax (5% of Starting Salary), Total Deduction (add W/Tax, SSS
and PAG-IBIG), and Net Salary (Starting Salary - Total Deductions).
7. Layout the worksheet.
8. Save the workbook with the same filename.

31
Employ First Starin W/Ta PAG
ee Family Name g x SSS - Total Net
IBI Deduc Salar
Number Name Salary G tion y
Evangeli
96-001 Santos ne 8,000 250 100

96-002 Trinidad Nenita 5,500 250 100


Alejandr
96-003 o Leilani 5,700 250 100
Dela
96-004 Cruz Yuri 6,000 250 100

96-005 Reyes Enrico 4,000 250 100


Dimasila
96-006 ng Vicente 4,500 250 100

96-007 Marcelo Michelle 4,300 250 100

96-008 Ramos Manolo 4,000 250 100


Dela
96-009 Cruz Abel 4,300 250 100

96-010 Endona Mylene 5,700 250 100

96-011 Cruz Natividad 4,000 250 100


Sta. Ma.
96-012 Maria Theresa 5,000 250 100
Dela
96-013 Cruz Abel 5,300 250 100

96-014 San Jose Marites 6,000 250 100

96-015 Reyes Nancy 5,000 250 100


Nativida
96-016 d Fatima 4,300 250 100

96-017 Ramos Manolo 5,000 250 100


Bonifaci
96-018 o Brigilda 6,000 250 100

96-019 Pascual Wendy 6,000 250 100


Tolentin
96-020 o Roberto 5,000 250 100

32
Rubric:
Category Exemplary Accomplished Developing Beginning Score
4 3 2 1
Skills All skills Most skills in Some Few or no
from the the topic are skills in skills from
topic are applied. the topic the topic
applied. are are applied.
applied.
Content The output The output is The output The output
exceeds the complete. is is
expectations somewhat incomplete.
. complete.
Correctness The output The output The output The output
is free from contains has contains
errors. minimal several many
errors. errors. errors.
Efficiency The student The student The The group
was able to was able to student used the
finish the finish the was able least
task in the task in the to efficient
most projected complete method in
effective way amount of the task finishing
without time. but used task.
wasting time methods
and effort. that
consumed
more time
and
resources.

33
Let Us Practice More

Take the Challenge!

Procedure:
1. Make this sheet on sheet1:
A B C D E F G H

1
OCRA CORPORATION
2 Comparative Income Statement
For the Years Ended December 31,2002 and 2003
3

5 2002 2003

7 Gross Sales 65650 70000

8 Less Sales Returns and Allowance 2900 1450

9 Sales Discounts 1050

10

11 Net Sales

12 Less Cost of Goods Sold 40500 42400

13 Gross Profit on Sales

14 Less Operating Expense 16870 18700

15 Net Operating Profit

16 Add Other Income

17 Interest Income 200 250

18

19 Less Other Expense

20 Interest Expense 150 190

34
21

22 Net Income

2. Use the following Formulas to complete the worksheet.


Net Sales = Gross Sales – Sales Return – Sales discount
Gross Profit on Sales = Net Sales – Cost of Goods Sold
Net Operating Profit = Gross Profit – Operating Expenses
Net Income = Net Profit + Interest Income – Interest
Expenses
3. Rename this sheet to Income.
4. Save this file under the filename Exer6.

Rubric:
Category Exemplary Accomplished Developing Beginning Score
4 3 2 1
Skills All skills Most skills in Some Few or no
from the the topic are skills in skills from
topic are applied. the topic the topic
applied. are are applied.
applied.
Content The output The output is The output The output
exceeds the complete. is is
expectations somewhat incomplete.
. complete.
Correctness The output The output The output The output
is free from contains has contains
errors. minimal several many
errors. errors. errors.
Efficiency The student The student The The group
was able to was able to student used the
finish the finish the was able least
task in the task in the to efficient
most projected complete method in
effective way amount of the task finishing
without time. but used task.
wasting time methods
and effort. that
consumed
more time
and
resources.

35
Let Us Remember

Microsoft Excel provides an automated way of displaying any statistical


data. It can be used to automatically compute for several factors that are not
easy to notice especially when faced by a large data. Microsoft Excel includes
several arithmetic and basic functions that help you compute faster.
With Microsoft Excel, organizing and analyzing data are much simpler
through the use of conditional functions such as COUNTIF, AVERAGEIF, SUMIF.
These functions work almost the same as Count, Average, and Sum with the
exception that you can provide criteria where if it is not met, the data is to be
ignored by the formula, and therefore not the computer.
COUNTIF is a function to count cells that meet a single criterion. COUNTIF
can be used to count cells with dates, numbers, and text that meet specific
criteria. The COUNTIF function supports logical operators (>,<,<>,=) and
wildcards (*,?) for partial matching.

Let Us Assess

Post Test
I. Multiple Choice: Circle the letter that corresponds to the correct answer.
1. A function used to count the number of cells that contains something
in
them if the criteria are not met.
a. COUNT c. COUNTING
b. COUNTNOW d. COUNTIF
2. A number format that puts a dollar symbol before each value by default.
a. percent c. comma
b. accounting d. date/time
3. A function that adds a range of cells.
a. ADD c. SUM
b. PLUS d. TOTAL
4. A function used to add a certain range of cells if a condition is met.
a. SUMIF c. TOTALIF
b. ADDIF d. PLUSIF
5. This is the tab of the format cells dialog box where you can change the
orientation of a text.
a. alignment c. file
b. orientation d. view
6. A program designed to create spreadsheets which can later be used to
analyze statistical data
a. Microsoft Excel c. Microsoft Publisher
b. Microsoft Word d. Microsoft OneNote
7. Which among the following is not part of the syntax for AVERAGEIF?

36
a. average range c. logical test
b. range d. criteria
8. The shortcut key for the Format Cells dialog box.
a. Ctrl+F c. Ctrl+1
b. Shift+F d. Alt+1
9. A function that gets the average of a range of cells.
a. AVERAGE c. MEAN
b. SUM d. MEDIAN
10. A syntax in the AVERAGEIF function that includes the value or label
that determines if the cell is part of the range to be averaged.
a. Range c. Average Range
b. Criteria d. Logical Test

II. Answer the following questions in three sentence or less.


1. Briefly explain the SUMIF, COUNTIF and AVERAGEIF functions.
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
___________
2. How Sum, Average and Count function works?
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
__________.
3. How do you create spreadsheet?
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
________.

37
Let Us Enhance

Procedure:

1. Open the Microsoft Excel.


2. Make this sheet on sheet 1.
3. Do the following:
Tagum National Trade School
(Computer Subject)
4th Grading Grade
Quizzes Exam Assignment Attendanc
e

Number of present
Total score of quiz

Assignment score
30% of the Exam
40% of the quiz

Assignment

Final Grade
Attendance
Percentage

Percentage
20% of the

10% of the
Exam Score
Percentage

Percentage
Quiz 2

Quiz 3
Quiz1

Student Name 10 10 10 30 80 50 10
1. Lim, Gendelle 8 0 0 55 44 7
2. Aurora, Dennis 7 8 2 76 42 8
3. Baltazar, 6 7 5 58 30 10
Rodrigo
4.Garcia, 4 5 5 78 38 8
Winefredo
5.Yee, Marie 5 6 7 65 37 7
Anne
6.Montemayor, 4 5 8 68 35 8
Hazel
7.Opanez, Jill 8 0 9 67 30 8
Kien
8.Goles, Brandon 7 0 8 58 31 8
9.Villaruz, 4 6 4 63 28 7
Sandra
10.Sevilla, 5 5 5 54 25 8
Rosalinda
11.Gomez, 6 6 0 50 24 10
Heralyn
12.Go, 5 5 7 47 20 8
Charmaine
13.Salcedo, Nessy 5 7 3 30 39 9

38
14.Paler, Glenn 4 3 7 35 48 9
15.Hilario, 0 7 4 38 44 9
Jessalyn

4. The 4th grading grade is computed as follows:


40% for the Quiz
30% for Exam
20% for Assignment
10% for Attendance
Therefore 4th grading grade =
Quiz*40%+Exam*30%+Assignment*20%+Attendance*10%
5. Format the grades to 2 decimal digit.
6. Rename this sheet to grades.
7. Sort the name according to ascending order.
8. Save this under the same filename.

Rubrics:
Category Exemplary Accomplished Developing Beginning Score
4 3 2 1
Skills All skills in Most skills in Some Few or no
Advanced Advanced skills in skills from
Word Word Advanced Advanced
processing processing Word Word
are applied. are applied. processing processing
are are applied.
applied.
Content The output The output is The output The output
exceeds the complete. is is
expectations somewhat incomplete.
. complete.
Correctness The output The output The output The output
is free from contains has contains
errors. minimal several many
errors. errors. errors.
Efficiency The student The student The The group
was able to was able to student used the
finish the finish the was able least
task in the task in the to efficient
most projected complete method in
effective way amount of the task finishing
without time. but used task.
wasting time methods
and effort. that
consumed
more time
and
resources.

39
Let Us Reflect

10 Essential things you should learn about Microsoft Excel

If you want to learn Excel, this lesson covers ten important things
that you need to know if you are going to use Excel effectively. Even if you've
been using Excel for a while, check out each of the individual lessons below
to make sure you have the basics covered - and maybe learn something new
along the way. If you have any questions about any of the lessons, you can
leave a comment at the bottom of this page, or at the bottom of the individual
lesson.

Note that each of these lessons will open in a new tab so you can come
back to this page easily when you've finished one of the lessons.

1. How to create a Pivot Table in Excel

Pivot Tables are considered by most advanced Excel users to be the


most powerful feature in Excel. Pivot Tables allow you to tabulate and report
on data in your spreadsheets in ways that would take hours to achieve
without using a Pivot Table.

2. How to enter basic formulas and calculations in Excel

If you're learning Excel, formulas are where the real magic begins.
Formulas allow you to perform calculations on data in your spreadsheet.
Simple Excel formulas allow you to add up, subtract, multiply, divide
and average one or more numbers in your spreadsheet. Complicated formulas
allow you to calculate just about anything you like.

3. Use the SUM function to add up a column or row of cells in Excel

Adding up numbers is something most Excel users do every day. There are a
number of ways to do this in Excel, and some of them are more efficient than
others.

4. Absolute and relative references in Excel

Once you get the hang of creating simple formulas and adding up
numbers in Excel, the next big thing to learn is the difference
between relative and absolute references in Excel formulas. It can take a bit
of time to get your head around, but understanding how relative and absolute
references work in Excel, and when to use them, is essential to becoming
an Excel ninja.

40
5. Rounding numbers in Excel

It's very important to understand how rounding works in Excel. A


common example is rounding prices to two decimal places in a sales
spreadsheet. If your formulas don't round price calculations to the correct
number of decimal places, then you can end up with sales figures that are
incorrect - and hunting down the differences can be a nightmare.
And rounding errors can cause havoc with your spreadsheets without you
even realizing it. A common mistake occurs when you change the display
format of a number to show fewer digits after the decimal point and assume
that the number has been rounded for use in other calculations.

6. Scale your spreadsheet to fit on one page when printing from Excel

Every Excel user has stories to tell about printing their


spreadsheet and finding that what should have been a simple one-page
spreadsheet has somehow spilled over onto 2 or more pages when they print
it out. The likelihood of this happening is usually related directly to how
important the document is, and how soon you need it.

7. Print an Excel 2010 spreadsheet with page numbers

There are no two ways about it - page numbers on spreadsheets are


important. You'll know what I mean if you've ever sat in a meeting where
someone handed out a 20-page spreadsheet without page numbers and then
proceeded to spend the meeting making you flip back and forth between
pages. Which page are we on now?

8. Freeze or lock rows and columns in an Excel worksheet

When you are working on a big spreadsheet it's easy to get lost as you
scroll through your data. For that reason, it can be handy to keep one or more
rows and/or columns locked so they don't disappear when you scroll down or
across in the spreadsheet.

9. How to use the IF function in Excel to calculate values based on


different criteria

The IF function is one of the major building blocks of a successful Excel


spreadsheet. As you're learning Excel, it won't be long before you want to write
a formula that returns one result if something is true (e.g. pay 5% sales
commission if sales are greater than $1000) and another result if it is false
(pay 3% sales commission if sales are less than or equal to $1000).

10. How to use Auto filter in Excel

If you have a table of data arranged in columns with multiple rows of


information, Auto filter is a very useful tool to know. Auto filter lets you treat
a range of cells as a table and then filter out certain rows based on different

41
criteria. For example, you might filter a table of sales data to show only rows
where a certain product was sold. Of you might filter the same sales table to
show only sales made between two dates, or sales over a certain value.

Answer key to Activities

10. d 10.d
a 9. a 9.
c 8. a 8.
d 7. d 7.
a 6. a 6.
a 5. a 5.
a 4. a 4.
c 3. c 3.
b 2. b 2.
a 1. d 1.
Pre-test Post-test

Reference

• Empowerment Technologies Innovative Training Works,


Inc.Kto12 First Edition.
• https://multimedia.journalism.berkeley.edu/tutorials/spreadsh
eets/

42

You might also like