Vous êtes sur la page 1sur 10

Microsoft Excel

2002 & 2003

Fantastic Formulas

Challenge City Learning Centre


North Avenue
Bradford
BD8 7ND
Tel: 01274 362075
www.challengeclc.co.uk

Contents
Formulas____________________________________________________________3
Commonly Used Formula______________________________________________3
Sum______________________________________________________________3
Average___________________________________________________________3
Min_______________________________________________________________3
MAX______________________________________________________________4
COUNT____________________________________________________________4
COUNTIF__________________________________________________________4
COUNTA___________________________________________________________4
PROPER, UPPER AND LOWER________________________________________5
TRIM______________________________________________________________5
CONCATENATE_____________________________________________________6
LEFT______________________________________________________________6
RIGHT_____________________________________________________________6
TODAY____________________________________________________________7
NOW______________________________________________________________7
VLOOKUP_________________________________________________________7
HLOOKUP_________________________________________________________8
IF_________________________________________________________________8
Evaluate A Nested Formula__________________________________________10

Challenge City Learning Centre

2 of 10

May 2006

Formulas
Formulas are equations that perform calculations on values in your worksheet. A formula
starts with an equal sign =.
Excel has also a number of pre-written formulas that carry out common and more complicated
calculations. They simplify the process of entering formulas and are known as functions.

Commonly Used Formula


Sum
Adds all neighbouring numbers in a row or column.

In this example, to calculate the total in cell B9 use:

=SUM(b4:b8)

Average
Calculates the average (mean) figure.
In this example, to calculate the average price of all the tuck shop
items, use:
=AVERAGE(b4:b8)

Min
Identifies the minimum (lowest) number in a range of data.
In this example, to identify the lowest price, use:
=MIN(b4:b8)

Challenge City Learning Centre

3 of 10

May 2006

MAX
Identifies the maximum (highest) figure in a range of data.
In this example, to identify the most expensive item use:
=MAX(b4:b8)

COUNT
Counts the number of cells that contain numbers.
In this example, to count the number of items in the tuck shop use:
=COUNT(b4:b8)

COUNTIF
Counts the number of cells within a range that meet the given criteria.

In this example, to count the items that cost 0.30 use:


=COUNTIF(B4:B8,"=0.30")

The criteria

COUNTA
Counts the number of cells that contain data (not empty) in a range or array.

In this example, to count the cells containing data use:


=COUNTA(B4:B8)

Challenge City Learning Centre

4 of 10

May 2006

Text Formulas
Text formulas can be a great time saver, particularly if you have copied information from
another application, or imported information that is displayed incorrectly.

PROPER, UPPER AND LOWER


Capitalises the first letter in a text string and any other letters in text that follow any character
other than a letter. It converts all other letters to lowercase letters.

To change
amy to Amy

Use
=PROPER(A4)

amy Franks to all upper case

=UPPER(A4)

Amy Franks to all lower case

=LOWER(A4)

Replicate these and you will change all the values to the required case.

TRIM
Removes all spaces from text except for single spaces between words. You can use TRIM on
text that you have received from another application that may have irregular spacing.
To remove the space before amy Franks use:
=TRIM(A4)
To remove the space and change the case at the same
time use:
=PROPER(TRIM(A4))
You can replicate these formulas to amend the other cells, removing spaces and altering the
case as required.

Challenge City Learning Centre

5 of 10

May 2006

CONCATENATE
Joins several text strings into one text string. For example if you have the first name in one cell
and the surname in an adjoining cell, this function will join the two together:
To join Amy and Franks together, use:
=CONCATENATE(A4," ",B4)
The inverted commas denote a space.

LEFT
Separates characters on the left.
In this example, to separate the ID number from
the name use
=LEFT(A4,5)
This tells Excel to start on the left and take the first
five characters.

RIGHT
Separates characters on the right.
In this example, to separate the Class from the
name use:
=RIGHT(A4,2)

Challenge City Learning Centre

6 of 10

May 2006

TODAY
Returns the serial number of the current date. The serial number is the date-time code used
by Microsoft Excel for date and time calculations. (If the cell format was General before the
function was entered, the result is formatted as a date.)

To input the date in cell B3 use:


=TODAY()

NOW
Returns the serial number of the current date and time. (If the cell format was General before
the function was entered, the result is formatted as a date.)
To input the date in cell B3 use:
=NOW()

VLOOKUP
Searches for a value from your spreadsheet in a separate table of data (where data runs
vertically in columns) and returns a value in from that separate table.
To add the supplier (currently held in a separate table of
data) use:
=VLOOKUP(A6,$A$17:$B$21,2,FALSE)
The cell value you
wish to look up in
your separate table.
The range of the
table to look up (table
array).

Challenge City Learning Centre

7 of 10

False: to find an exact


match,
True: to find the
nearest match.
The column number
of the actual value
you are looking for.

May 2006

HLOOKUP
Searches for a value from your spreadsheet in a separate table of data (where data runs
horizontally in rows) and returns a value in from that separate table.
To add the Fat Content (currently held in a
separate horizontal table of data) use:
=HLOOKUP(A6,$A$24:$E$25,2,FALSE)
False: to find an
exact match,
True: to find the
nearest match.

The cell
value you
wish to look
up in your
separate
table.
The range of the
table to look up
(table array).

The column
number of the
actual value you
are looking for.

IF
Returns one value if a condition you specify evaluates to TRUE and another value if it
evaluates to FALSE. Use IF to conduct conditional tests on values and formulas.
Use IF function to determine the healthy
category for each item if the Fat
Content is less than 18 then enter
Green. If not, enter Red:
=IF(C6<18,"Green","Red")
The logical
test: can only
be answered
True or False.

The value to
be returned if
test is FALSE

The value to
be returned if
test is TRUE

Challenge City Learning Centre

8 of 10

May 2006

Insert Function
Typing in more complicated formulas can be difficult and time-consuming. The Insert Function
button guides you through the process and builds the formula accordingly.
1.

Click the Insert Function button:


The dialog box will be displayed.

2.

The most recently used functions are displayed. If the function you wish to use is not
displayed, click the Or select a category drop down list. If you know which category it
is in then select it, if not select All.
The Function Arguments dialog box is then displayed:

3.

Follow the information at the bottom of the box, to build the formula.

Challenge City Learning Centre

9 of 10

May 2006

Nested Formulas
In certain cases, you may need to use a function as one of the arguments of another function.
(Arguments: the values that a function uses to perform operations or calculations. The type of
argument a function uses is specific to the function. Common arguments that are used within
functions include numbers, text, cell references, and names.)
For example, the following formula uses a nested AVERAGE function and compares the result
with the value 50.

Valid returns When a nested function is used as an argument, it must return the same type
of value that the argument uses. For example, if the argument returns a TRUE or FALSE
value, then the nested function must return a TRUE or FALSE. If it doesn't, Microsoft Excel
displays a #VALUE! error value.
Nesting level limits A formula can contain up to seven levels of nested functions. When
Function B is used as an argument in Function A, Function B is a second-level function.
For instance, the AVERAGE function and the SUM function are both second-level functions
because they are arguments of the IF function. A function nested within the AVERAGE
function would be a third-level function, and so on.

Evaluate A Nested Formula


You can see the different parts of a nested formula evaluated in the order the formula is
calculated.
For example, you can see this in the following formula where the function AVERAGE(F2:F5) is
shown as its value, 80.
=IF(AVERAGE(F2:F5)>50,SUM(G2:G5),0) as
=IF(80>50,SUM(G2:G5),0)
1.

Select the cell you want to evaluate. Only one cell can be evaluated at a time.

2.

On the Tools menu, point to Formula Auditing, and then click Evaluate Formula.

3.

Click Evaluate to examine the value of the underlined reference. The result of the
evaluation is shown in italics.
If the underlined part of the formula is a reference to another formula, click Step In to
display the other formula in the Evaluation box. Click Step Out to go back to the
previous cell and formula.

4.

Continue until each part of the formula has been evaluated.


To see the evaluation again, click Restart.
To end the evaluation, click Close.

Challenge City Learning Centre

10 of 10

May 2006

Vous aimerez peut-être aussi