Formulas - correct
formula with = sign After pressing ENTER
1
Missing = sign
Missing = sign! After pressing ENTER
Before pressing enter (no change - not a formula)
2
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
3
Explicit values and cell references
You can use both explicit values and cell references in a
formula:
– Formula with only cell references: =a1*b1
– Formula with only literal values: =100/27
– Formula with both cell references and literal values:
=a1/100
4
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
5
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
6
Examples of Range Names
C3:E10
B2:B5
B3:E3
7
Summing a range
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)
8
Relative Cell References
• By default, when you copy a formula that
contains a cell reference, excel will automatically
adjust the cell reference.
9
Relative Cell References
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
10
Go to course website:
[Link]