Sie sind auf Seite 1von 17

Microsoft

Formulas & Functions

Amarillo College
Revision Date: June 25, 2008
Table of Contents
FORMULAS ............................................................................................................................................................ 1

OPERATORS USED IN FORMULAS ......................................................................................................................................1


ORDER OF OPERATIONS ..................................................................................................................................................1
DISPLAYING FORMULAS...................................................................................................................................................2

FUNCTIONS ............................................................................................................................................................ 2

=SUM ........................................................................................................................................................................3
=AVERAGE .................................................................................................................................................................3
=MAX ........................................................................................................................................................................4
=MIN .........................................................................................................................................................................4
=LARGE ......................................................................................................................................................................4
=SMALL .....................................................................................................................................................................4
=COUNT ....................................................................................................................................................................5
=COUNTBLANK ..........................................................................................................................................................5
=IF .............................................................................................................................................................................6
=COUNTIF ..................................................................................................................................................................9
=SUMIF ....................................................................................................................................................................11

NAMING RANGES ................................................................................................................................................ 13

CHANGING A RANGE NAME ...........................................................................................................................................13

RELATIVE VS. ABSOLUTE ADDRESSING ................................................................................................................. 13

PASTE SPECIAL ..................................................................................................................................................... 15

i
Microsoft Excel 2007 Formulas & Functions

FORMULAS
A formula is an arithmetic calculation such as addition or subtraction that is performed on values
that are in the worksheet. Formulas can only be applied to cells containing values or other
formulas.
All formulas in Excel have to being with the equal (=) sign.

Operators Used in Formulas


Exponents
^
Multiplication
*
Division
/
Addition
+
Subtraction
-

Order of Operations
To calculate the answer to any formula, Excel follows these algebraic rules:
Level 1 Calculate anything inside parentheses. If the set of parentheses are
inside another set, the innermost set is calculated first
Level 2 Calculate any exponents
(example: 7^4 means 7 * 7 * 7 * 7 )

Level 3 Multiplication or Division

Level 4 Addition or Subtraction

Other rules:
1. The innermost set of parentheses gets calculated first in nested parentheses.
2. If there are more than one set of operators at a given level (see the table above) then the
one that is first encountered, reading from left to right, is calculated first. For example, in
the formula: =5 * 4 / 2, there are two Level 3 operators. Therefore, reading from left to
right, the 5 would be multiplied by 4, and the answer would then be divided by 2
resulting in the answer of 10.
3. If there are no parentheses, Level 1 operations are calculated before Level 2, which are
calculated before Level 3, which are calculated before Level 4.

Page 1
Microsoft Excel 2007 Formulas & Functions

Displaying Formulas
1. Press CTRL + ~ The ~ key is located above the TAB key on the keyboard.
2. Press the same combination of keys to get back to normal view.

FUNCTIONS

Functions are utilities that help people work with data stored in worksheets. There are over 100
different functions and even a couple of new ones in Excel 2007. Some functions work with text
entries, others deal with calculations, while others work with time.

=function name(parameters)

IMPORTANT FUNCTIONS

Out of the 100+ functions available in Excel, there is only a handful that you will probably use.
Some of the most-used functions are listed in the following table.

SUM SUM returns the total of the set of values


AVERAGE AVERAGE function is returns the average of the set of values
MAX MAX returns the largest number from a set of values
MIN MIN returns the smallest number from a set of values
LARGE LARGE returns the k-th largest number in the data set
SMALL SMALL returns the k-th smallest number in the data set
COUNT COUNT counts the number of values in the range
COUNTBLANK COUNTBLANK function is used to count empty cells
COUNTIF COUNTIF counts cells within a range that meet a specified criterion
SUMIF SUMIF returns the sum value from a specified range that meets a criterion
IF IF performs one set of directions based on the outcome of a comparison. If
something is true, it performs a task. Otherwise, it performs another task.

Page 2
Microsoft Excel 2007 Formulas & Functions

=SUM
This is the most-often used function in Excel. It totals a collection of values.
**See the Did You Know section on page 7 for an easy way to enter this type of function**

Example #1:
Find the sum of the Amount field:
=SUM(C2:C15) Any cell not containing a value or
formula, such as C5 and C12, would be ignored.

Example #2:
Find the total of cells C3, C9, and C14:
=SUM(C3 + C9 + C14)

=AVERAGE
This function divides the total of the values in a
specified range by the number of values in that range.

**See the Did You Know section on page 7 for an


easy way to enter this type of function**

Example #1:
Find the average of the Amount field:
=AVERAGE(C2:C15) In the example, it would divide by twelve.

Example #2:
Find the average of cells C2, C7, and C14.
=AVERAGE(C2, C7, C14)

Page 3
Microsoft Excel 2007 Formulas & Functions

=MAX
This function finds the largest value in a range.
**See the Did You Know section on page 7 for an easy way to enter this type of function**

Example:
Find the largest value in the Amount field:
=MAX(C2:C15)

=MIN
This function finds the smallest value in a range.
**See the Did You Know section on page 7 for an easy way to enter this type of function**

Example:
Find the smallest value in the Amount field:
=MIN(C2:C15)

=LARGE
This function returns the x-th largest value in a range.

Example #1:
Find the 4th highest value of the Amount field:
=LARGE(C2:C15, 4)

Example #2:
Find the 10th highest value of the Amount field:
=LARGE(C2:C15, 10)

=SMALL
This function returns the x-th smallest value in a range.

Example #1:
Find the 5th lowest value of the Amount field:
=SMALL(C2:C15, 5)

Example #2:
Find the 9th lowest value of the Amount field:
=SMALL(C2:C15, 9)

Page 4
Microsoft Excel 2007 Formulas & Functions

=COUNT
This function returns the number of values in a range.
**See the Did You Know section on page 7 for an easy way to enter this type of function**

Example:
Find the number of values in the Amount field:
=COUNT(C2:C15)

=COUNTBLANK
This function returns the number of cells that are completely empty.

Example:
Find the number of empty cells in the Amount field:
=COUNTBLANK(C2:C15)

Page 5
Microsoft Excel 2007 Formulas & Functions

=IF
An IF Function will place something in a cell based on a comparison. Something will be
compared, and based on that comparison, a particular action will be performed.
Syntax:
=IF(Comparison, action to take if true, action to take if false)

Data for Example:

Example #1:
In the illustration above, we want to place an If function in cell F2 to do the following.
If Filled is less than Capacity, then print YES in the Available field; otherwise, leave it blank:
=IF(E2<D2, YES, )

Page 6
Microsoft Excel 2007 Formulas & Functions

Did You Know?


The icon can be used to quickly and easily insert one of these functions SUM,
AVERAGE, MAX, MIN, or COUNT into a cell.

1. Place the cursor in the cell where the answer is to be displayed.

2. On the Home tab, click the drop-down arrow to the right of the icon,
located on the Editing ribbon.
3. Click the desired function.
4. If the automatic range feature has not placed a moving border around the correct cells,
press the DETETE key to remove the automatic highlighted range.
5. Click and drag the mouse over the range of cells containing the desired numbers, or hold
down the CTRL key while you click individual cells.
6. Press ENTER.

Page 7
Microsoft Excel 2007 Formulas & Functions

Data for Examples

Example #2
In the previous illustration, we want to place an IF function in cell C2 to do the following.
If Sales is greater or equal to $5,000, then the Commission is the amount of sales increased by
6%; otherwise, the Commission is the amount of sales increased by only 2%.
=IF(B2>=5000, B2*1.06, B2*1.02).

Page 8
Microsoft Excel 2007 Formulas & Functions

=COUNTIF
This function counts the number of cells containing the text or value that is specified as a
criterion.

1. Click the cell into which the function is to be stored.

2. As shown on the previous illustration, click on the Formulas icon.


3. Type COUNTIF and press ENTER twice.
4. Click-and-drag the mouse over the cells to be searched for the criteria.

5. In the Criteria field, specify one of the following:


a. Type the word to match
b. Type the operator such as <> (less than & greater than) followed by the word to
match
6.

Page 9
Microsoft Excel 2007 Formulas & Functions

Data for Examples

Example #1:
Count the number of sales by Smith.
=COUNTIF(A2:A15, Smith)

Example #2:
Count the number of sales not made by Smith.
=COUNTIF(A2:A15, <>Smith)

Example #3:
Count the number of sales greater or equal to the value stored in cell D2.
=COUNTIF(C2:C15, >=&D2)

Page 10
Microsoft Excel 2007 Formulas & Functions

=SUMIF
This function will sum the values that correspond to a set of criteria. It is similar to the
COUNTIF function, except it requires one more piece of data.

1. Click the cell into which the function is to be stored.


2. Click on the Formulas icon. See the illustration in the previous part of this manual if
needed.
3. Type SUMIF and press ENTER twice.
4. Click-and-drag the mouse over the cells to be scanned for words that meet the criteria.

5. Click the Criteria field and then click any cell containing the word to be used as the
search criteria. For example, if you are searching for all cells with the word Smith in
them, then click a cell containing the word Smith. Alternatively, you can type the word
into the Criteria field instead of clicking on a cell.
6. Click the Sum_Range field and then highlight the cells in the worksheet that are to be
added to the sum.
7.

Page 11
Microsoft Excel 2007 Formulas & Functions

Data for Example:

Example:
Add up the Amounts for the Sales Rep named Smith.
=SUMIF(A2:A15,A2,C2:C15)

Page 12
Microsoft Excel 2007 Formulas & Functions

NAMING RANGES

Some of the advanced functions require ranges to be named before the function will work
properly.
1. Highlight the range.
2. Click in the Name box (illustrated below) and type the new name for the range.

Changing a Range Name

1. On the Formulas tab, click the Name Manager icon, located on


the Defined Names ribbon.
2. Highlight the name to be changed and then click the button.
3. Type the new name (no spaces or special characters allowed) and press ENTER .
4.

RELATIVE VS. ABSOLUTE ADDRESSING


A relative cell reference is relative to the position of the formula. For example, a formula typed
in cell C3 that contains a relative reference to cell B2 would look for the value one cell above
and one cell to the left of C3. If this formula were copied to cell D7, it would look for the value
in cell C6 (one cell above and one cell to the left of the formula cell). If a user wants a formula
to point to a specific cell, no matter where the formula is copied, then dollar signs $ has to be
added before the column letter and/or the row number, such as $B$2.

Example #1
1. Type a value (100 for example) in cell A1.
2. In cell B5, enter this formula: =A1+50 The answer will be 150.
3. Copy the formula to cells C5, D5, and E5. Notice the errors that are displayed because
relative addressing did not work in this situation.
4. Change the formula in cell B5 to =$A$1+50. The answer will still be 150.
5. Now copy the formula to cells C5, D5, and E5. The same answer is displayed in the
other cells because they are all pointing to the same cell because of the absolute
addressing.

Page 13
Microsoft Excel 2007 Formulas & Functions

Example #2
Keeping a Running Total in Excel.
The function shown in the text box below, shows that the first part of the function is absolute, but
the second part of the function is relative. Notice that the dollar signs signify that the portion is
absolute.

=SUM($B$1:B1)

NOTE: The function F4 key will scroll through the Absolute Formatting options. When the
value is highlighted, and the F4 key is pressed repeatedly, the formatting symbols will appear
inside the cell.

Page 14
Microsoft Excel 2007 Formulas & Functions

PASTE SPECIAL

This feature allows you to paste material into a cell in a different format than what is achieved
with the standard Paste feature.

None Specifies that no mathematical operation will be applied to the copied data.
Add Specifies that the copied data will be added to the data in the destination cell or range of cells.
Subtract Specifies that the copied data will be subtracted from the data in the destination cell or range
of cells.
Multiply Specifies that the copied data will be multiplied with the data in the destination cell or range
of cells.
Divide Specifies that the copied data will be divided by the data in the destination cell or range of
cells
Skip blanks Avoids replacing values in your paste area when blank cells occur in the copy area
Transpose Changes columns of copied data to rows, and vice versa
Paste Link Links the pasted data on the active worksheet to the copied data in a different location

Example: Multiplication
1. Open the worksheet containing the original data. This original data is to be increased by
15%.
2. Type 1.15 into an empty cell. (15% more than the original)
3. Copy the value that was added in step #2 above.
4. Highlight the cells containing the original data that is to be increased.

5. On the Home tab, click the Paste icon, located on the Clipboard ribbon.
6. Choose Paste Special.
7. Click the option button for Multiply.
8.

Page 15

Das könnte Ihnen auch gefallen