Introduction To Excel: Therese Charmaine Ybañez
Introduction To Excel: Therese Charmaine Ybañez
Excel
Therese Charmaine Ybañez
1
Worksheet
Basics
2
3
Worksheets
• Excel’s main
screen is called a
“worksheet”.
• Each worksheet is
comprised of many
boxes, called
“cells”.
4
Organize Information
• You can organize
information by
typing a single
piece of data into
each cell. (see next
slides)
How to Enter Information
5
6
Selecting a Cell
• “Select” a cell
by clicking on it
once (don’t
double click).
9
10
• The columns of
the worksheet
are named with
letters
• The rows are
named with Selected
Cell
numbers
11
12
13
15
16
Resizing a Row
• Make a row
taller or
shorter by
dragging
the
separator
between the
rows.
Row is now
• Click and taller
drag here to
resize row
5.
19
20
21
Formatting Cells
• Select one or more cells and then click on any of the formatting buttons (see
below) to change the formatting of the selected cells.
• Formatting buttons: show fewer decimal points (ex.
10.507 is displayed as 10.51)
These change the way show more decimal points (ex.
numbers are displayed 10.507 is displayed as 10.5070)
in cells. (these don’t
affect words). indent within cell
put border around cell(s)
center color of cell
font font color of
name size left justify right justify text in cell
• Ctrl-click
and drag
(This cell is also selected
to select even though it appears
white).
additional
ranges
26
Selecting entire Rows, entire Columns or
all cells on the worksheet.
• To select an entire column, click on the letter for
the column header. To select several columns,
click on the header for the first column and drag to
the right.
• To select an entire row, click on the number for
the row header. To select several rows, click on the
header for the first row and drag down.
• To select all of the cells on the spreadsheet, click
on the upper left hand corner of the spreadsheet
(where the column headers meet the row headers)
27
Click Click
Example - continued
• Step 1: Click on
row header for
row 5
• Step 2:
Ctrl-click on
row-header for
row 11
• Step 3: Press
Bold button or
type ctrl-b
• Note: After
being “bolded”,
the word
“Employee” is
now too wide
for the column,
so make the
column wider if
necessary (this
step is not
shown).
More Advanced Formatting
29
30
Format Cells
• Using the formatting buttons only
give you a limited amount of
formatting ability.
• For more formatting ability, select
one or more cells and right click on
the selection. Then choose “format
cells” from the popup menu.
• Choose options from the Number,
Alignment, Font, Border and
Patterns tabs and press OK to
change the way your information
looks on the screen.
• The Protection tab is used to lock
cells so that their contents can’t be
modified.
• We will not go into the details of
using the format cells dialog box at
this time but you should be able to
figure out most of it by yourself.
31
Formatting changes how things LOOK,
not how they WORK.
• NOTE: you will probably not understand this slide
until after you learn about Excel Formulas.
Formulas are covered later in this presentation.
• When you change the format of a cell, Excel still
“remembers” the original value.
• Excel will use the un-formatted value when
calculating formula values.
• Example: if you change numbers to appear with
fewer decimal points the original number with all
of its decimal points are used in calculations.
Formulas
32
33
Excel Formulas
• You must have an equals sign ( = ) as the first
character in a cell that contains a formula.
• The = sign tells excel that the contents of the cell
is a formula
• Without the = sign, the formula will not calculate
anything. It will simply display the text of the
formula.
34
Formulas - correct
Missing = sign
Types of operations
• You can use any of the following operations in a
formula:
operation symbol example
addition: + =a1+3
subtraction: - =100-b3
multiplication: * =a1*b1
division: / =d1/100
exponentiation ^ =a2^2
negation - =-a2+3
(same symbol as subraction)
37
=a1/100
Errors in Formulas
38
39
Common Errors
• The following are some errors that may appear in a spreadsheet (there are others too).
– #######
• Cell is too narrow to display the results of the formula. To fix this simply make the column wider and
the “real” value will be displayed instead of the ###### signs. Note that even when the ###### signs are
being displayed, Excel still uses the “real” value to calculate formulas that reference this cell.
– #NAME?
• You used a cell reference in the formula that is not formed correctly (e.g. =BB+10 instead of =B3+10)
– #VALUE!
• Usually the result of trying to do math with a textual value. Example: =A1*3 where A1 contains the
word “hello”
– #DIV/0!
• Trying to divide by zero. Example: =3/A1 where A1 contains 0 (zero)
– Circular Reference
• Using a formula that contains a reference to the cell that the formula “lives in”. Example: putting the
formula =A1+1 in cell A1 or putting the formula =SUM(A1:B2) in any of the cells A1, B1, A2, B2
Order of Operations
40
41
Complex formulas
• You can use several operations in one function
• You can group those operations with parentheses
• Examples
=3*2+1
=c1*(a1+b1)
=(100*a2-10)+(200*b3-20)+30
=(3+2*(50/b3+3)/7)*(3+b7)
42
Order of operations
• When using several operations in one formula,
Excel follows the order of operations for math.
– first: all parentheses - innermost first
– second: exponents (^)
– third: all multiplication (*) and division (/). Do
these starting with the leftmost * or /
and work to the right.
– fourth: all addition (+) and subtraction (-). Do
these starting with the leftmost + or -
and work to the right.
43
Menumonic Meaning
– Please parentheses
– Excuse exponents
Order of operations
• The value of
3+2*5
is
13
NOT 25!
45
Order of operations
3 + (100 - 20) / 10 - 6 * 2 / 4 + 9
3 + 80 / 10 - 6 * 2 / 4 + 9
3+ 8 - 6 * 2 / 4 + 9
3 + 8 - 12 / 4 + 9
3+8 - 3 + 9
11 - 3 + 9
8+9
answer: 17
46
Cntrl-`
• To see the formulas in the worksheet
– Press the Cntrl key at the same time as you press the `
key (i.e. Cntrl-`)
– Press Cntrl-` again to see the values
47
Functions
48
What is a function?
• A function is a "named operation"
• Functions have
– a name
– parentheses
– parameters/arguments inside the parentheses
• The words parameter and argument mean the same thing
• you can have many parameters for one function separated
with commas (,)
• The number of parameters is one more than the number of
commas.
49
Function Result
=SUM(1,2,3,4,5) 15
=SUM(a1,b1,c1) a1+b1+c1
=SUM(9,a1,b2,5,c1) 9+a1+b2+5+c1
50
Terminology
SUM(1,2,3,4,5)
– The name of the function is "SUM"
51
52
Ranges
• A rectangular box of cells is called a “range”.
• The name of a range is
– the name of the upper left cell of the range
– Followed by a colon :
– Followed by the lower right cell of the range
• Example: A1:B2 is shorthand for A1,A2,B1,B2
– See next slide for more examples
A1:B2
53
B2:B5
B3:E3
54
without a range
=SUM(a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4)
with a range
=SUM(a1:c4)
55
=SUM(a1:b2,100,c4:c7,d3)
=SUM(a1,a2,b1,b2,100,c4,c5,c6,c7,d3)
Other Functions
56
57
Other functions
• Click the function button to see the available
functions:
Function buton
brings up the
function dialog box
(see next slide)
Warning: this slide was created using 58
Excel 2000. The dialog box in later
versions of Excel looks a little different,
but it has the same functionality.
Function dialog box
categories Functions for the selected category
(i.e. groups of functions)
Description
of currently
selected
function
59
Function Editor
• Double click on the function name to get a dialog
box that helps you enter values for the parameters
of the function.
(see next slide)
60
Function Editor
Put values for the parameters in When you press OK, this will create
the edit boxes. the function call:
AVERAGE(2,a1:c2,f13)
61
Example
• AVERAGE
• Example:
– The reference, 2:2, refers to all of the cells on the 2nd row.
– The following formula adds up all of the values on the 2nd and 4th rows of the
spreadsheet:
=sum(2:2,4:4)
• Another Example:
– The reference, 2:4, refers to all of the cells on the 2nd , 3rd and 4th rows,.
– The following formula adds up all of the values on the 2nd, 3rd, 4th , 10th, 11th ,
12th, 13th, 14th and 15th rows of the spreadsheet:
=sum(2:4,10:15)
66
• Example:
– The reference, B:B, refers to all of the cells in the 2nd column.
– The following formula adds up all of the values in the 2nd and 4th columns of
the spreadsheet:
=sum(B:B,D:D)
• Another Example:
– The reference, B:D, refers to all of the cells in the 2nd, 3rd and 4th columns.
– The following formula adds up all of the values in the 2nd, 3rd, 4th, 6th and 7th
columns of the spreadsheet:
=sum(B:D,F:G)
67
• Examples
sheet2!a1
sheet2!b4:c8
'2002 Forecasts'!f3:f10
=sum('2002 Forecasts'!f3:f10)
=sum('2202 Forecasts'!f:f)
68
More examples
• Add up values from 2 different sheets
=sum ( 'great stocks'!b2:c4, 'so so stocks'!b2:c4)
Explanation
a1 this is a cell reference on the current sheet
a!a1 "a" is the name of sheet. "a1" is a cell on the "a" sheet
b1:b4 this is a range on the current sheet
b1!b4 "b1" is the name of a sheet. "b4" is a cell on the "b1"
sheet
c!c:c “c" is the name of a sheet. “c:c" is all of the cells in the c column
on the “c” sheet
69
Examples
• The following all refer to the same cell
d9
$d$9
$d9
d$9
Mixed References
• $d9 and d$9 These are "Mixed" cell references:
• $d9
– The "d" will stay the same when you copy the cell, but
the "9" will change.
• d$9
– The "d" will change when you copy the cell, but the
"9" will stay the same.
75
Data Types
76
• Numeric
Data Types
– values: any number
– operators: + - * / ^ %
– sample functions: sum( ), average( ), max( ), min( ) etc.
• Dates
– values: dates and times
operators: N/A
– sample functions: now( ), today( ), hour(), minute(), etc.
78
79
– text data
– string data
– character data
Text data
• Text data is used to store general purpose text (e.g.
names, places, descriptions, etc)
(Same
Spreadsheet)
82
83
Text Functions
• Many functions are used to manipulate text
values.
• The following are only some of them
right( )
left( )
mid( )
concatenate( )
lower( )
upper( )
len( )
RIGHT, LEFT and MID
functions
84
85
RIGHT function
• The RIGHT function is used to isolate a specific
number of “characters” from the right hand side of
a text value.
• (example on next slide)
86
Values View
87
LEFT
• The LEFT function is the same as the RIGHT
function, but it returns characters from the LEFT
side of the value.
89
MID ( <text>, <startPosition> ,
<numCharacters>)
• MID is used to get values from the middle of some
text.
Values View
Concatenation
( & ) and
CONCATENATE function
91
92
Concatenation (&)
• Use & to combine (or concatenate) two different text values
Formula View
Values View
Values View
94
Values View
97
Values View
CONCATENATE Function
• You can use the CONCATENATE function instead
of the ampersand (&).
• The following formulas are equivalent:
=A1&B1&C1
=CONCATENATE(A1,B1,C1)
99
LOWER ( <textValue> )
100
UPPER ( <textValue> )
• LOWER converts text to lower case.
• UPPER converts text to upper case.
• Example:
Formula View
Values View
101
LEN ( <textValue> )
• LEN returns a numeric value equal to the number
of character in a text value (i.e. the “length” of the
text value).
• Spaces ARE included in the length.
• Example
Formula View
Values View
Dates and Times
102
103
– Formulas View
104
• The value of both the date and the time is stored internally as a single decimal number.
• The whole number portion represents the DATE and is the number of days since Dec. 31,
1899
• The decimal part represents the TIME and is the fraction of the day that has elapsed.
• Examples:
– Jan 1, 1900 at 12AM is 1.0 (i.e. 1 day since Dec 31, 1899 and 0 percent of the day elapsed so far)
– Jan 2, 1900 at 12PM is 2.5 (i.e. 2 days since Dec. 31, 1899)
– Feb 1, 1900 at 1:05 PM is 32.5451388888889 (i.e. 32 days since Dec 31, 1899 and
0.5451388888889 of the day elapsed by 1:05 PM. This makes sense as it is a little past noon so a
little more than half of the day elapsed.
105
• Formulas View
106
Date Arithmetic
• You can do arithmetic with dates.
• Add and subtract days by adding and subtracting whole numbers.
• Add and subtract times by adding and subtracting fractional values.
• Examples
=A1+7 (one week after the date in A1)
=A1-5*7 (5 weeks before the date in A1)
=A1- (1/24) (one hour before the time specified in A1)
=A1+ (3/24) (three hours after the time specified in A1)
=A1+2.5 (two and a half days after the time specified in A1)
=A1-A2+1 (the # of days between the date in A1 and the date in A2)
107
OR
108
109
TRUE
or
FALSE
110
TRUE
• The following statements are TRUE:
3 is greater than 2
2 is less than 3
2 is less than or equal to 3
2 is less than or equal to 2
3 is greater than or equal to 2
3 is greater than or equal to 3
2 is equal to 2
2 is not equal to 3
111
FALSE
• The following statements are FALSE:
2 is greater than 3
3 is less than 2
3 is less than or equal to 2
2 is greater than or equal to 3
2 is equal to 3
2 is not equal to 2
112
Logical operators
• In Excel the following "operators" are used
Operator Meaning
> greater than
< less than
>= greater than or equal to
<= less than or equal to
= equal to
<> not equal to
• Examples
3>2 true
3<2 false
113
Logical Formulas
Formula View Values View
114
IF Function
116
IF function
AND
OR
NOT
121
AND
• The following is TRUE
AND function
123
AND
Formula View Values View
124
AND function
• Takes any number of parameters
• Returns TRUE if ALL of the parameters evaluate
to TRUE otherwise returns FALSE.
128
OR
• Takes any number of parameters
• Returns TRUE if ANY of the parameters evaluate
to TRUE otherwise returns FALSE
130
NOT
• Takes ONLY ONE parameter
• Returns the "opposite" of the value of the
parameter
– returns FALSE if the parameter value is TRUE
– returns TRUE if the parameter value is FALSE
131
132
133
ISBLANK( <value> )
• ISBLANK returns TRUE if the value is blank and
false otherwise. (see example below) Total will be
wrong if
quantity is
blank (since
a blank is
normally
Total will be correct even if quantity
treated as
is blank (quantity is assumed to be 1
zero)
Formula View in that case)
blank value
Values View
APPENDICIES
134
Using the mouse to create
formulas.
135
136
references.
• Cell ranges:
• Click and drag on a cell to enter a cell range reference
140
141
• EXAMPLE:
If you type the following into a cell (before you press Enter)
Leading
zeroes are
missing
• Choose
"Text"
from the
"Numbe
r" tab
and
press the
OK
button.
145
147
148
Force a Cell to Display as Text by Using an
Apostrophe (')
• Another way to display leading zeroes in a number is to
type an apostrophe as the first character in the cell.
• When you press Enter, the apostrophe is NOT displayed
in the cell (it is displayed in the formula bar).
• The apostrophe tells Excel that the contents of the cell
should be treated as text.
• The apostrophe is similar to the = sign.
– The = sign tells Excel that the cell contains a formula.
– The apostrophe (‘) tells Excel that the cell contains a text value.
149
150
151
Example
Formula to formula view (press Cntrl-`)
add up all
numbers in
column D
(Same
Spreadsheet)
Example - continued
To fix the problem you can This will force NOTE: When you stop
add an apostrophe (') before the number to editing the cell, the
the data for the year (no space be treated as apostrophe will NOT be
necessary after the text (see next visible in the spreadsheet.
apostrophe). slide). However, it will be visible in
the formula bar.
155
Example - finished
The number for the year is The apostrophe in not visible in The apostrophe IS
now treated as text and is the spreadsheet (unless you're visible in the formula
not included in the sum. editing the cell). bar.