Você está na página 1de 30

Ms-Excel

Lecture 4

Enter formulas
Use functions
Use the AutoSum button
Use the AutoSum list
Use Formula AutoComplete
Insert functions in formulas
Edit functions
Use the AutoCalculate feature
Use range borders to modify formulas
Agenda
Check formula errors

Formulas
are
used
to
perform
calculations on values entered into the
cells of a worksheet. They consist of the
addresses of the cells containing the
values,
constant
values
and
the
appropriate mathematical operators.
For example, to add
the numbers in cells
C3 and D3, you
would
type
the
formula
=C3+D3.is a Formula?
What

Operator
+
*
/
%
^

Performs
Addition
Subtraction
Multiplication
Division
Percentage
Exponentiation (Power)

Mathematical Operators

Since formulas use cell addresses, they


automatically recalculate whenever the
value in any cell used in the formula
changes. When a cell containing a
formula is selected, the formula
appears in the formula bar and the
calculated results of the formula
appear in the cell.

Using Formula

Operat Performs
or
()
Controls the order of mathematical
operations;
calculations
within
parentheses are performed first
%
Converts
a
number
into
a
percentage; for example, for 10%,
Excel reads the value as .10
^
Exponentiation; for example, for
2^3, Excel readsOperators
the value as 2*2*2
Mathematical

In case of using more than one operator


in a formula, it is calculated using the
standard
mathematical
order
of
precedence. The order of precedence is
as follows:
For example, the
parentheses
result of 2+3*4 is
14, on the other
exponentiation
hand the result of
multiplication and division
addition and subtraction(2+3)*4 is 20.

Precedence

Excels AutoCorrect feature identifies


and offers suggestions on common
mistakes made while entering formulas.
If an error is found, either accept the
correction provided or correct the
formula manually.
For example, if a formula is entered as
=A1+B1+, AutoCorrect will suggest
the formula =A1+B1.

AutoCorrect

Formula begins with an equal sign (=) in


the cell where result is required.
Cell addresses can be either typed or
selected using the mouse or keyboard.
Each referenced
cell have
coloured
borders with squares at their corner.
Enter arithmetic operators in the formula
wherever appropriate.

Anatomy of a Formula

entered.
Type an equal sign (=) to begin the
formula.
Enter the first cell referenced in the
formula.
Enter the first mathematical operator.
Enter the next cell referenced in the
formula.
Continue entering cell references and
mathematical operators as needed.
Constructing
athe
Formula
When finished creating
formula, press
[Enter]

Cell contents
in
the
Formula Bar
Cells referred
in the formula
Cell
containing
Formula

Cell
Cell addresses
addresses are
are not
not
case
case sensitive;
sensitive; a
a cell
cell
address
address can
can be
be entered
entered
as
as either
either C5
C5 or
or c5.
c5.
However,
once
However,
once the
the
[Enter]
[Enter] key
key is
is pressed,
pressed,
Excel
automatically
Excel
automatically
changes
all
cell
changes
all
cell
references
to
references
to
uppercase.
uppercase.

Entering Formula

Excel has built-in functions that are


shortcuts for formulas. Functions are
special pre-written formulas that perform
an operation on values or ranges of
values and return the result to a cell in
the worksheet. Functions can be used to
simplify and shorten formulas in
worksheets,
especially
those
that
perform lengthy or complex calculations.

Using Functions

Like a formula, a function also starts with


an equal sign (=) followed by the
function's name and, its arguments
enclosed in parentheses. The function
uses the arguments in its calculations.
Arguments may be none, cell addresses,
values, labels, or even other functions or
formulas, or a combination of these.
FUNCTION
NAME
ARGUMENT(S)

Using Functions

Functions are most commonly used to perform


calculations on a range of cells. For example, it
is easier to use the =SUM(A1:A7) function to
add the numbers in cells A1 through A7 than
to
type
the
formula
=A1+A2+A3+A4+A5+A6+A7

Excel provides help in the form of a


function ScreenTip. It displays the
structure of the function (i.e., the
function name and the order of its
required arguments).

Using Functions

The most commonly used function is


the SUM function, which calculates the
total of the values in a range of cells.
Since the SUM function is used
frequently, there is an AutoSum
button on the Formulas tab in the
Ribbon that enters the formula in the
active cell. AutoSum is an easy way to
sum values in a row or column of a
worksheet.

Using AutoSum

On clicking the AutoSum button, a


suggested range for the function
appears. A blinking, colored border
called a range finder defines the
suggested range.
If clicked at the end of a row, the
contiguous row of values to the left of
the active cell is suggested.
If clicked at the bottom of a column, the
contiguous column of values above the
active cell is suggested.

Using AutoSum

If there are values both above and to the


left of the active cell, the contiguous
column of values above the active cell is
suggested.
If the suggested range is incorrect, it can
be changed by dragging to select the cells
containing the values to calculate.

The AutoSum button provides an arrow


which, when clicked, displays a list of
other functions can be used on the cells
within the AutoSum
selected range.
Using

1. Select the cell where


to enter the formula.
2. Click the left-hand part
of
the
AutoSum
button
in
the
Function
Library
group
on
the
Formulas tab.
3. Press [Enter].

Using AutoSum

arrow, which displays a list of other


functions that can be performed on
consecutively filled cells in a column or
row.
Each of these functions automatically
use the cell range immediately
adjacent to the active cell for the
suggested range. If suggested the
range is incorrect, it can be changed by
dragging to select the cells containing
Using
the valuesAutoSum List

FUNCTI
ON
SUM
AVERAG
E

MAX
MIN

EXAMPLE

DESCRIPTION

=SUM(A1:A20)
=AVERAGE(A1:A
20,0)

Totals all the numbers in a range


Returns the average of a range of
numbers; if a cell in the range is
empty, it is not used in calculating the
average; if a cell in the range
contains the number zero, it is used in
calculating the average
=MAX(A1:A20)
Returns the highest value in a range
of numbers
=MIN(A1:A20)
Returns the lowest value in a range of
numbers
=COUNT(A1:A20) Returns the number of cells in the
range that contain numbers

AutoSum List

COUNT

1. Select the cell where to enter the formula.


2. Select the arrow on the AutoSum button in
the Function Library group on the
Formula tab.
3. Select the desired function.
4. Drag to select the range, if necessary.
5. Release the mouse button.
6. Press [Enter].
Click the More Functions
command in the AutoSum to
access all Excel functions,
opening
Insert
Function
Dialog.

AutoSum List

The
Formula
AutoComplete
feature
displays valid functions, names and text
strings that match the letters in a dynamic
drop-down list. Refine the range of options
by continuing to type trigger letters or scroll
through the list using keys on the keyboard.

Formula AutoComplete

A period
entering
function
[Enter]
replaces

(.) or colon (:) can be used for


the endpoints of a range in a
(A1.A5). On pressing
the
key,
Excel
automatically
the period (.) with a colon (:).

The name of a function is not casesensitive. For example, SUM, Sum, or


sum are the same.
Excel will add the ending parenthesis
when entering a function, if skipped.
Tips

argument and some have optional


arguments. Optional arguments are
shown with square brackets in the
ScreenTip for each function.
The five functions listed above can have
up to 254 additional arguments. Type a
comma after a range to enter another
argument.
For
Example
=AVERAGE(B5:B8,D5:D8,C16)
calculates the average of all the
numbers in B5 to B8, D5 to D8 and cell
Optional Arguments
C16.

To open the Insert Function


dialog box.
Click the Insert Function
button in the formula bar.
Select the on the Insert
Function button in the
Function Library group on
the Formula tab
Press [SHIFT] + [F3] from
keyboard.

Insert Functions
Wizard

Search box help finding


the function needed.
Function category
List of the functions
within
selected
category.

Insert Functions
Wizard

The AutoCalculate feature performs a


simple calculation on a selected range of
cells without making you supply a formula.
The result of the calculation are
temporary, appears on the Status Bar and
are not placed in the worksheet.
By default, three of the AutoCalculate
functions (Average, Count and Sum) are
enabled in the Status Bar and will display
their results as soon as a range of cells
containing
values is selected.
AutoCalculate

Excel identifies its range references in


the formula by displaying them with
differently colored borders, with square
handles at each corner.
User can change the arguments in a
formula by
Dragging a range border to include a
different group of range.
Moving the range border to reference an
entirely different range.

Range Borders -Modify


Formulas

Changing the size of


the border to include
more or fewer cells.

The corresponding
range reference in
the formula changes
accordingly.

Range Borders -Modify


Formulas

Excel provides an error checking


feature that automatically checks
formulas against a pre-existing set of
rules. If a formula breaks a rule, an
error indicator appears in the form of
a colored triangle in the corner of the
cell containing the suspect formula.

Checking Formula Errors

Você também pode gostar