ICT Training

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 121

Worksheet

Basics

1
2

Worksheets
• Excel’s main
screen is called a
“worksheet”.

• Each worksheet is
comprised of many
boxes, called
“cells”.
3

Organize Information
• You can organize
information by
typing a single
piece of data into
each cell. (see next
slides)
How to Enter Information

4
5

Selecting a Cell
• “Select” a cell
by clicking on it
once (don’t
double click).

• You can move


from cell to cell
with the arrow
keys or by
pressing the
“Enter” key.
6

Entering Information / The Formula Bar


• To enter information in a
cell, just start typing.

• When you are done


either
– Press the Enter Key
– Press an arrow key
– Click on the “check
button” (only visible
when entering data into
a cell)

• The information in the


selected cell is also
displayed in the
“formula bar” above the
worksheet.
7

Double Click to Modify a Cell


• To modify the contents
of a cell double click
on the cell.
• Then use the right, left
arrow keys and the
Insert and Delete keys
to modify the data. Double click to
• When you are done: change “hi there” to
“hello there”
– Press the Enter key
or
– Click on the check box.
Names of Rows, Columns and
Cells

8
9

Column Names (letters) & Row Names (numbers)

• The columns of
the worksheet
are named with
letters
• The rows are
named with Selected
Cell
numbers
10

Cell Names (ex. B4)


Name Selected
• The name of a cell is a combination Box Cell
of the Letter Of The Column that
the cell is in followed by the
Number Of The Row that the cell is
in.

• Example: the selected cell in the


picture is named B4 (NOT 4B)

• Excel automatically shows the the


name of the currently selected cell
in the “name box” (located above
the worksheet).

• The letter must come first (i.e. B4,


NOT 4B) and there may NOT be any
spaces between the letter and the
number.

• We will learn later why it is


important to understand how to name
cells.
Longggggggg Data

11
12

Information that is “too wide” for a cell


• The word “Name” is in cell
A5
• The words “Hours Worked”
are in cell B5 (NOT in cell
C5). However, since the
information is too wide for
cell B5, it looks like it
“Hours
extends into cell C5. Worked” is
• You can determine that the in cell B5
(look at
information is really only IN formula bar)
cell B5 by selecting cell B5
and looking at the formula
bar and then selecting cell C5
and looking at the formula “Hours
Worked” is
bar. NOT in cell
C5 (formula
bar is empty)
13

Information that is “Chopped Off”


• If there is information • You can see the
in the cell to the right, complete data by
then the original cell selecting the cell and
still contains all of the looking in the formula
data, but the data bar.
appears to be
“chopped off”.
Change the Width of a Column or
the Height of a Row

14
15

Make a column wider Drag column


separator to the
right
• To make Column B wider,
point the cursor to the
column separator between
columns B and column C.
• The cursor changes to a
“Double headed arrow”.
• Now, click the left mouse
button and without letting
go of the button, drag the
separator to the right to
make the column wider (or
to the left to make the column
narrower). Column is now wider
16

Getting the Exact Width


• To get the “exact” width, Double click here
double click on the
separator instead of
dragging it.

Column is now EXACTLY the correct width


17

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.
18

Putting an “Enter” inside a cell


Step 1: Originally
“Hours Worked”
• To add a new line is on one line.
inside a cell
– Double click inside
the cell where you
Step 2: Double click
want the new line.
to edit cell and then
– Press Ctrl-Enter press Ctrl-Enter
(i.e. hold down the
Ctrl key and press
Enter while still
holding down Ctrl).
– When you are done
editing, press Enter Step 3: Press Enter
(without holding (without Ctrl) to
accept the changes.
down Ctrl) to
accept the changes.
19

Activity 1
Open a new worksheet
Using uppercase… input the following on
cells a1, b1, c1

Type 5 names of your students with their first, middle


and last names under each corresponding column
Basic Formatting
(e.g. bold, colors, fonts, etc)

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

bold center & merge cells


(will explain later) remove indent
italics
show with commas (e.g.
click on underline 12345 becomes 12,345) click on
downward downward
pointing arrows show as percent (ex.
pointing arrows
for other font 0.5 becomes 50%)
for other colors
names and show as currency and border
sizes (ex. 1000.507 becomes $1000.50) styles
22

Example – unformatted worksheet


• Unformatted worksheet – see next slide for formatting.
23

Example –making cells bold


• Click on cell A1 and drag to cell A3.
• Then press the Bold button to make cells A1,A2,A3 bold.
• You could also press the font or background color buttons to change the color
or apply any other formatting you like (this is not shown below).
24
Other Ways of Selecting More Than One
Cell
• To select a large range of cells, click on the upper
left cell in the range. Then hold the shift key and
click on the lower right cell in the range.
• You can select different “non-contiguous” areas of
cells by holding down the Ctrl key while clicking
and dragging.
25

Selecting Non-Contiguous Ranges


• Click and
drag to
select the
first
range.

• 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

Select Entire Columns/Rows/Worksheet


To select ENTIRE COLUMN B To select ENTIRE ROW 2
click on “B” column header click on “2” row header

Click Click

To select ROWS 2,3 and 5,6,7


To select COLUMNS B,C,D – click on “2” row header, drag down,
click on “B” column header and drag to right – then Ctrl-Click on “5” row header and drag down

drag Click and drag down


Click
then Ctrl-Click
and drag down

To select COLUMNS B,C and F,G,H


– click on “B” column header, drag to right, To select ENTIRE WORKSHEET
– then Ctrl-Click on “F” column header and drag right click on select worksheet button
(in corner between “1” and “A” buttons)
Ctrl-
Click
drag Click drag Click
28

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.
32

ACTIVITY 2
> Same worksheet
Resize the columns so that the full text will be
shown
select cell a1, b1, c1
Change the font style to arial black
Font color to RED
Formulas

The bread and butter of Excel

33
34

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.
35

Formulas - correct

formula with = sign After pressing ENTER


36

Missing = sign

Missing = sign! After pressing ENTER


Before pressing enter (no change - not a function)
37

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)
38

Explicit (literal) values and cell references


• You can use both explicit values and cell
references in a formula
• An explicit value is also called a literal value

– Formula with only cell references: =a1*b1

– Formula with only literal values: =100/27

– Formula with both cell references and literal values:

=a1/100
Errors in Formulas

39
40

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

41
42

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)
43

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.
44

Please Excuse My Dear Aunt Sally


• The sentence "Please excuse my dear aunt Sally" is a
popular mneumonic to remember the order of operations:

Menumonic Meaning
– Please parentheses

– Excuse exponents

– My Dear mulitplication and division


(going left to right)

– Aunt Sally addition and subtraction


(going left to right)
45

Order of operations
• The value of

3+2*5

is

13

NOT 25!
46

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
47

Ctrl- ~
• To see the formulas in the worksheet
– Press the Ctrl key at the same time as you press the ~
key (i.e. Ctrl- ~)
– Press Ctrl- ~ again to see the values
48

ACTIVITY 3
On the same worksheet…
Add quiz 1, quiz 2, quiz 3 on the cell d1, e1, f1
Assuming each quiz can give 10 points max
Provide fill the cells below with random scores not exceeding 10 points
On cell g1 type total score
Average on cell h1
Percentage on cell i1
49

ACTIVITY 3
ON CELL G2 input a formula to get the sum of cells
d2, e2, f2

ON CELL H2 input a formula to get the average of


cells d2, e2, f2

ON Cell I2 INPUT FORMULA TO DIVIDE CELL


G2 BY 30 multiplied by 100
50

Functions
51

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.
52

The SUM function


• Examples

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
53

Terminology
SUM(1,2,3,4,5)
– The name of the function is "SUM"

– The parameters or arguments to this function are


1,2,3,4 and 5

– The entire thing, i.e. SUM(1,2,3,4,5), is a function call

– The value of this function call is 15.


Another way to say this is that this function call
returns 15.
54

Activity 4
• Get the sum of all the total scores in column G by
using the sum function
• Get the average of all the averages by using the
average function
Ranges (e.g. a1:c3)

55
56

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
57

Examples of Range Names


• Examples
C3:E10

B2:B5

B3:E3
58

Using a range as a parameter


• Ranges can be specified as a parameters to a function call.
• Both of the following function calls produce the same
result as =a1+b1+c1+a2+b2+c2+a3+b3+c3+a4+b4+c4
however the 2nd version uses a range and is much shorter.

without a range
=SUM(a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4)

with a range
=SUM(a1:c4)
59

Function calls with multiple parameters


• You can include multiple ranges and cells as parameters

• Example: the following function call has 3 parameters.


There are two ranges (a1:b2 and c4:c7), one number (100)
and one cell reference (d3)

=SUM(a1:b2,100,c4:c7,d3)

Is the same as:

=SUM(a1,a2,b1,b2,100,c4,c5,c6,c7,d3)
Other Functions

60
61

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 62
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
63

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)
64

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)
65

Example
• AVERAGE

formula that contains a function value


=AVERAGE(2,4,10,4) 5
=AVERAGE(a1,f32) (a1+f32) / 2
=AVERAGE(a1:c1) (a1+b1+c1) / 3
=AVERAGE(a1:c1,10) (a1+b1+c1+10) / 4
66

Combining Functions and other values


in a single formula
67

Functions and other values


• You can combine functions, cell references and
literal values to make a complex Excel formula
• Examples
=3 + b23 * SUM(d20:g20)
=SUM(a1,100) * AVERAGE(d10:j10)
=100 / ( AVERAGE(b2,c2,d30) + AVERAGE(f1:f20) )
68

Absolute and Relative


Cell References
69

Absolute and Relative Cell References


• By default, when you copy a formula that contains
a cell reference, excel will automatically adjust the
cell reference.

• You can stop Excel from automatically adjusting


the cell reference by using one or more dollar
signs ($) in the cell reference. These are called
absolute cell references.

• A cell reference without a dollar sign is a relative


cell reference.
70

Examples
• The following all refer to the same cell
d9
$d$9
$d9
d$9

• The only difference between these cell references


relates to what happens when you copy a formula
that contains the cell reference.
71

Relative Cell Reference


• d9 This is a "relative cell reference".
– Changing the column: If I copy this cell reference to
another cell:
• the "d" will increment one letter for every cell that I move
over to the right.
• The "d" will decrement one letter for every cell that I move
over to the left
– Changing the row: If I copy this cell reference to
another cell:
• the "9" will increment by one for every cell that I move
down.
• The "9" will decrement by one for every cell that I move up
72

Absolute cell reference


• $d$9 This is an absolute cell reference.
– If I copy a formula with this cell reference, the cell
reference will NOT change AT ALL.
73

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.
74

Data Types
75

• Numeric
Data Types
– values: any number
– operators: + - * / ^ %
– sample functions: sum( ), average( ), max( ), min( ) etc.

• Text (AKA Character or String)


– values: Any group of letters or numbers or special characters.
Prefix value in cell with an apostrophe ( ' ) to force a text value
– operators: & (concatenation)
– sample functions: right( ), left(), mid(), lower(), upper(), len(), etc

• Dates
– values: dates and times
operators: N/A
– sample functions: now( ), today( ), hour(), minute(), etc.

• Logical (AKA boolean)


– values: true false
– Operators: < > = <> <= >=
– sample functions: if( ), and( ), or( ), not( ), isblank()
76

Data Types for Values in Cells


• By default:
– a cell that contains a number is treated as numeric data
– a cell that contains a date is treated as date data (we'll
see more about this later)
– a cell that contains data which is
not numeric and not a date is treated as "text"
Text Data

77
78

Text / String / Character


• The following three terms all used to refer to
"text" data. All three terms mean the same thing.

– text data
– string data
– character data

• This presentation will generally use the term "text


data" but you should be familiar with the terms
"string data" and "character data"
79

Text data
• Text data is used to store general purpose text (e.g.
names, places, descriptions, etc)

• You can't do "math" with text values (obviously)


80
Text isn't part of numerical calculations
(obviously)
Formula to formula view (press Cntrl-`)
add up all
numbers in
column C

(Same
Spreadsheet)

values view (press Cntrl-`)


Text data in
C1 is not
included in
the Sum
Dates and Times

81
82

How Excel Stores Dates


• Dates are stored in Excel as the number of days since Dec 31,
1899 for that date. (ex. Jan 1, 1900 is stored as the number 1).
• To see this, type a date in a cell and then press Ctrl-` to see the
“formulas view”.
• Example
– Values View
Dates become
numbers in
“formulas
view”

– Formulas View
83

Times and Dates in the same Cell


• A cell can contain both a date and a time.

• 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 1, 1900 at 12PM is 1.5 (i.e. 0.5 of the day elapsed)

– 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.
84

Times and Dates - Example


• Values View

• Formulas View
85

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)
86

Formatting cells with Dates and Times


• Right click on the cell and
choose “Format Cells”
• From the “Category” list in the
“Number” tab either
– Choose “Date”, “Time” or
“Custom” and choose an
appropriate looking format

OR

– If you choose “General” or


“Number”, the internal number
for the Date/Time will be
displayed in the spreadsheet even
in the “values” view.
Helpful Functions

• Concatenate
• Proper Function
• Text to columns
• IF statement
• Combining Cells
Concatenation
( & ) and
CONCATENATE function

L/O/G/O
www.themegallery.com

88
Concatenation (&)
• Use & to combine (or concatenate) two different text values

Formula View

Values View

Notice that there is no


space between the two
89
values
Concatenate many
values
• You may concatenate many values together
Formula View

Values View

90
Concatenation with
"literal" values
• You can also concatenate "literal" values.
• You must include the literal values inside
quotes
• For example to display spaces in the "full
name" in the previous example you could
use the following formula. Each space that
you want to display must be included in
quotes.

=A2&" "&B2&" "&C2 91


Concatenating spaces -
Example
• You can concatenate spaces into a
formula
Formula View

Values View values


contain
spaces

92
LEFT( ) with & in same

formula
You can combine the results of different
function calls with concatenation.
Formula View

Values View

93
Putting it all together
• In this example we concatenate periods into
the initials.
Formula View

Values View

The initials now contain


periods
94
MS EXCEL

• Change text to upper, lower, or proper


(normal) font
Change text to upper,
lower, or proper (normal)
font
• PROPER function
capitalizes the first letter in each word.
• UPPER function
changes text to all uppercase.
• LOWER function
changes text to all lowercase.
LOWER ( <textValue> )
UPPER ( <textValue> )
• LOWER converts text to lower case.
• UPPER converts text to upper case.
• Example:
Formula View

Values View

97
Change text to proper
case with the PROPER
function
• To change Annik’s name to proper case,
select cell B1. Type =PROPER(A1), and
press Enter.
Change text to upper,
lower, or proper (normal) font
• To copy the formula down through cell B5,
double-click the green square in the lower-
right corner of cell B1.
• The names in column B are all in proper
case.
Get rid of the first column

• Just deleting the column of mistyped names might


result in formula errors (#REF!). Here's how to
remove the column:
• Copy the names in column B by dragging down
the column and pressing Ctrl+C.
• Right-click cell A1.
• Click Paste Special > Values > OK to paste the
names in column A without the formulas.
• Select column B.
• Right-click the selection, and pick Delete > Entire
Column > OK.
MS EXCEL
Text to Columns
• What if you want to split out information
that's in one cell into two different cells?
For example, you want to separate
someone’s full name into first name and
last name.
MS EXCEL
Text to Columns
• First, highlight the column that you want to split up.
Next, go to the Data tab and select "Text to
Columns." A module will appear with additional
information.
• Second, you need to select either "Delimited" or
"Fixed Width.“
"Delimited" means you want to break up the
column based on characters such as commas,
spaces, or tabs.
"Fixed Width" means you want to select the
exact location on all the columns that you want the
split to occur.
Excel Formulas

• Simple Calculations
• In addition to doing pretty complex
calculations, Excel can help you do simple
arithmetic like adding, subtracting,
multiplying, or dividing any of your data.
• To add, use the + sign.
• To subtract, use the - sign.
• To multiply, use the * sign.
• To divide, use the / sign.
Excel Formulas

• You can also use parenthesis to ensure


certain calculations are done first. In the
example below (10+10*10), the second
and third 10 were multiplied together
before adding the additional 10. However,
if we made it (10+10)*10, the first and
second 10 would be added together first.
Excel Formulas

• Bonus: If you want the average of a set of


numbers, you can use the formula
=AVERAGE(Cell Range). If you want to
sum up a column of numbers, you can use
the formula =SUM(Cell Range).
Conditional Formatting
Formula

• Conditional formatting allows you to


change a cell's color based on the
information within the cell. For example, if
you want to flag certain numbers that are
above average or in the top 10% of the
data in your spreadsheet, you can do that.
If you want to color code commonalities
between different rows in Excel, you can
do that. This will help you quickly see
information the is important to you.
Conditional Formatting
Formula

• To get started, highlight the group of cells


you want to use conditional formatting on.
Then, choose "Conditional Formatting"
from the Home menu and select your logic
from the dropdown. (You can also create
your own rule if you want something
different.) A window will pop
up that prompts you to provide more
information about your formatting rule.
Select "OK" when you're done, and you
Conditional Formatting
Formula
IF Statement

• Sometimes, we don't want to count the number of


times a value appears. Instead, we want to input
different information into a cell if there is a
corresponding cell with that information.
• For example, in the situation below, I want to
award ten points to everyone who belongs in the
Gryffindor house. Instead of manually typing in
10's next to each Gryffindor student's name, I can
use the IF THEN Excel formula to say that if the
student is in Gryffindor, then they should get ten
points.
IF Statement

• The formula: IF(logical_test,


value_if_true, value of false)

• =IF(D2="Gryffindor","10","0")
IF Statement

• Sometimes, we don't want to count the number of


times a value appears. Instead, we want to input
different information into a cell if there is a
corresponding cell with that information.
• For example,I want to award ten points to
everyone who belongs in the Gryffindor house.
Instead of manually typing in 10's next to each
Gryffindor student's name, I can use the IF
THEN Excel formula to say that if the student is in
Gryffindor, then they should get ten points.
IF Statement

• Logical_Test: The logical test is the "IF" part of the


statement. In this case, the logic is D2="Gryffindor" because
we want to make sure that the cell corresponding with the
student says "Gryffindor." Make sure to put Gryffindor in
quotation marks here.
• Value_if_True: This is what we want the cell to show if the
value is true. In this case, we want the cell to show "10" to
indicate that the student was awarded the 10 points. Only use
quotation marks if you want the result to be text instead of a
number.
• Value_if_False: This is what we want the cell to show if the
value is false. In this case, for any student not in Gryffindor,
we want the cell to show "0" to show 0 points. Only use
quotation marks if you want the result to be text instead of a
number.
Dollar Signs

• Have you ever seen a dollar sign in an


Excel formula? When used in a formula, it
isn't representing an American dollar;
instead, it makes sure that the exact
column and row are held the same even if
you copy the same formula in adjacent
rows.
Dollar Signs

• To change the relative formula (=A5+C5)


into an absolute formula, we'd precede the
row and column values by dollar signs, like
this: (=$A$5+$C$5).
Combine cells using "&"

• Databases tend to split out data to make it


as exact as possible. For example, instead
of having a data that shows a person's full
name, a database might have the data as
a first name and then a last name in
separate columns. Or, it may have a
person's location separated by city, state,
and zip code. In Excel, you can combine
cells with different data into one cell by
using the "&" sign in your function.
Combine cells using "&"

• The formula with variables from our


example below: =A2&" "&B2
Combine cells using "&"

• The formula with variables from our


example below: =A2&" "&B2
• But you're not finished -- if all you type in
is =A2&B2, then there will not be a space
between the person's first name and last
name. To add that necessary space, use
the function =A2&" "&B2. The quotation
marks around the space tell Excel to put a
space in between the first and last name.
Combine cells using "&"

• To make this true for multiple rows, simply


drag the corner of that first cell downward
Activity 5

• Put the first name, middle name and last


name in a single column by using the
concatenate function
• Insert a new column after column C
• On cell d2 type =A2&" "&B2&" "&C2
MISCELLANEOUS
• Adjusting all column widths or row heights in a
worksheet
• Instantly displaying all worksheet formulas
• Creating Charts
• Print Preview
• Instant date or time
• Undo Redo
• Zooming in and out quickly
• Split Screen and Frozen titles
The End

121

You might also like