You are on page 1of 84

Get started with formul

In just a few steps, you’ll be up and running with building formulas and func
world’s most powerful spreadsheet app.

Go back to the top by pressing CTRL+HOME. To start the tour, press CTRL+PAGE DOWN.
While =10+20
might
calculate the
same result as
=A1+B1,
constants
aren’t a good
practice.
Why? Because
you can’t
Basics:
easily see
You can
constant
Basics: Doing maths with Excel
Doing
the maths with Excel
Add, Subtract, Multiply and Divide in Excel without using any built-in functions. You just need to use some basic opera
without
To Add, select
selecting the cell F3, type =C3+C4, then press Enter.
You can Add, Subtract, Multiply and Divide in Excel without using any built-in
cell and
Formulas can
looking
To for
Subtract,
contain functions.
cell You
it.select cell F4,just
typeneed to use
=C3-C4, thensome
press basic
Enter.operators: +, -, *, /. All formulas start
That can make
references,
To Multiply, with an equals
select cell F5, (=)
typesign.
=C3*C4, then press Enter.
it hard to
ranges of cell
change
references,
To Divide, later.
select cell F6, type =C3/C4, then press Enter.
It’s much
operators and
easier to put
1
constants. The
Take
your a look areat this: change the numbers in cells C3 and C4, and watch the formula results automatically change.
constants
following
in cells
EXTRA
all where
CREDIT: You can raise a value to a power by using the carat (^) symbol, like =A1^A2. Enter it by pressing Shift+6. In cell
examples
they
of
Dive can befor
formulas:
down 2 more detail
easily
Next step
adjusted and
=A1+B1
More aboutinformulas, cells and ranges
referenced
=10+20
Excel
your is made3up of individual cells that are grouped into rows and columns. Rows are numbered, and columns are lettered. Th
formulas.
=SUM(A1:A10)
For example:
Select the that in our third example above, we used the SUM function. A function is a pre-built command that takes a value
You’ll notice
yellow cell 4
with 12
Formulas with functions start with an equals sign, then the function name follows with its arguments (the values a function us
below. You’ll
see we used
You confirm a formula by pressing Enter. Once you do that, the formula will be calculated and the result will be displayed in th
the SUM
function with Dive down for more detail
a range of
SomeWe
cells. formula explanations
didn’t
=10+20type
is a “4”
formula, where 10 and 20 are constants and the + sign is the operator.
or “8” directly
=SUM(A1:A10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula argum
into the
formula. More about formulas, cells and ranges
=SUM(A1:A10,C1:C10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formul

Previous
Excel is made up of individual cells that are grouped into rows and columns. Rows
Next
are numbered, and columns are lettered. There are over 1 million rows and 16,000
More information on the web
columns, and you can put formulas in any of them.
Use Excel Formulas
as a calculator
can contain cell references, ranges of cell references, operators and
Overview constants.
of formulasThe
in Excel
following are all examples of formulas:
Excel functions (by category)
=A1+B1
Excel functions (alphabetical)
Free Excel training=10+20
online
=SUM(A1:A10)
You’ll notice that in our third example above, we used the SUM function. A function
is a pre-built command that takes a value or values, calculates them in a certain way
and returns a result. For instance, the SUM function takes the cell references or
ranges you specify and totals them. In this example it takes the cells A1 to A10, and
totals them. Excel has over 400 functions, which you can explore on the Formulas
tab.
Formulas with functions start with an equals sign, then the function name follows
with its arguments (the values a function uses to calculate) wrapped in parentheses.
Formulas with functions start with an equals sign, then the function name follows
with its arguments (the values a function uses to calculate) wrapped in parentheses.

You confirm a formula by pressing Enter. Once you do that, the formula will be
calculated and the result will be displayed in the cell. To see the formula itself, you
can look at the formula bar beneath the Ribbon, or press F2 to enter Edit mode,
where you’ll see the formula in the cell. Press Enter again to finalise the formula and
calculate the result.

Previous

More information on the web


Basics: Doing maths with Excel
ics: Doing maths with Excel
can Add, Subtract, Multiply and Divide in Excel without using any built-in functions. You just need to use some basic operators: +, -, *, /. A

Add, select cell F3, type =C3+C4, then press Enter.


You can Add, Subtract, Multiply and Divide in Excel without using any built-in
functions.
Subtract, You
select cell F4,just
typeneed to use
=C3-C4, thensome
press basic
Enter.operators: +, -, *, /. All formulas start
with
Multiply, an equals
select cell F5, (=)
typesign.
=C3*C4, then press Enter.

Divide, select cell F6, type =C3/C4, then press Enter.


1 To Add, select cell F3, type =C3+C4, then press Enter.
e a look at this: change the numbers in cells C3 and C4, and watch the formula results automatically change.
RA CREDIT: You can raise a value to a power by using the carat (^) symbol, like =A1^A2. Enter it by pressing Shift+6. In cell F7, enter =C3^C
e down for2 moreTodetail
Subtract, select cell F4, type =C3-C4, then press Enter.

re about formulas, cells and ranges


el is made3up ofTo Multiply,
individual select
cells cellgrouped
that are F5, typeinto
=C3*C4, then
rows and press Enter.
columns. Rows are numbered, and columns are lettered. There are over 1

’ll notice 4
that inTo
ourDivide,
third example above,
select cell F6, we used
type the SUM
=C3/C4, function.
then A function is a pre-built command that takes a value or values, calcu
press Enter.
mulas with functions start with an equals sign, then the function name follows with its arguments (the values a function uses to calculate)

confirm a formula by pressing Enter. Once you do that, the formula will be calculated and the result will be displayed in the cell. To see th
Dive down for more detail Next step
me formula explanations
+20 is a formula, where 10 and 20 are constants and the + sign is the operator.
UM(A1:A10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula arguments, and A1:A
More about formulas, cells and ranges
UM(A1:A10,C1:C10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula arguments, an

Excel is made up of individual cells that are grouped into rows and columns. Rows
are numbered, and columns are lettered. There are over 1 million rows and 16,000
re information on the web
columns, and you can put formulas in any of them.
Excel Formulas
as a calculator
erview constants.
can contain cell references, ranges of cell references, operators and
of formulasThe
in Excel
following are all examples of formulas:
el functions (by category)
=A1+B1
=A1+B1 Cell
el functions (alphabetical) reference
e Excel training=10+20
online
=SUM(A1:A10)
You’ll notice that in our third example above, we used the SUM function. A function
is a pre-built command that takes a value or values, calculates them in a certain way
and returns a result. For instance, the SUM function takes the cell references or
ranges you specify and totals them. In this example it takes the cells A1 to A10, and
totals them. Excel has over 400 functions, which you can explore on the Formulas =SUM(A1
tab.
A range of cells has a st
Formulas with functions start with an equals sign, then the function name follows ending cell. When you se
with its arguments (the values a function uses to calculate) wrapped in parentheses. formula, Excel will auto
A range of cells has a st
Formulas with functions start with an equals sign, then the function name follows ending cell. When you se
with its arguments (the values a function uses to calculate) wrapped in parentheses. formula, Excel will auto
You confirm a formula by pressing Enter. Once you do that, the formula will be
calculated and the result will be displayed in the cell. To see the formula itself, you
can look at the formula bar beneath the Ribbon, or press F2 to enter Edit mode,
where you’ll see the formula in the cell. Press Enter again to finalise the formula and
calculate the result.

Previous Next
=SUM(A1
More information on the web Opening paren

Use Excel as a calculator

Overview of formulas in Excel

Excel functions (by category)

Excel functions (alphabetical)

Free Excel training online


Numbers to use: Operation: Formulas: Answers:

1 Addition (+) 3
2 Subtraction (-) -1

Multiplication (*) 2

Division (/) 0.5


TAKE A LOOK Power AT THIS EXTRA CREDIT
(^) You can raise a1 value to a
Change the numbers here, and power by using the carat (^)
ressing Shift+6. In cell F7, enter =C3^C4.
watch the formula results symbol, like =C3^C4. Enter it
automatically change. by pressing Shift+6.

olumns are lettered. There are over 1 million rows and 16,000 columns, and you can put formulas in any of them.

and that takes a value or values, calculates them in a certain way and returns a result. For instance, the SUM function takes the cell refere

he values a function uses to calculate) wrapped in parentheses.

will be displayed in the cell. To see the formula itself, you can look at the formula bar beneath the Ribbon, or press F2 to enter Edit mode

tain the formula arguments, and A1:A10 is the cell range for the function.
ses contain the formula arguments, and A1:A10,C1:C10 are the cell ranges for the function separated by a comma.

GOOD TO KNOW
Operator Operator Constants are values that you enter in cells or fo
While =10+20 might calculate the same result a

=A1+B1 =10+20 constants aren’t a good practice. Why? Because


easily see the constant without selecting the ce
looking for it. That can make it hard to change l
much easier to put your constants in cells wher
Cell Cell be easily adjusted and referenced in your formu
Constant Constant
reference reference
For example: Select the yellow cell with 12 belo
see we used the SUM function with a range of c
didn’t type “4” or “8” directly into the formula.

Function Argument

=SUM(A1:A10)
A range of cells has a starting cell, colon and an
ending cell. When you select a range of cells for a
formula, Excel will automatically add the colon.
A range of cells has a starting cell, colon and an
ending cell. When you select a range of cells for a
formula, Excel will automatically add the colon.
Values
4
Commas separate multiple arguments 8
12
Function Argument Argument

=SUM(A1:A10,C1:C10)
A range of cells Another range of cells

Opening parenthesis Closing parenthesis. Excel will usually add this


for you when you press Enter.
nction takes the cell references or ranges you specify, and totals them. In this example it takes the cells A1 to A10, and totals them. Excel h

ress F2 to enter Edit mode, where you’ll see the formula in the cell. Press Enter again to finalise the formula and calculate the result.

W
that you enter in cells or formulas.
calculate the same result as =A1+B1,
od practice. Why? Because you can’t
nt without selecting the cell and
n make it hard to change later. It’s
our constants in cells where they can
d referenced in your formulas.

he yellow cell with 12 below. You’ll


M function with a range of cells. We
directly into the formula.
ually add this
nter.
10, and totals them. Excel has over 400 functions, which you can explore on the Formulas tab.

d calculate the result.


Double-click
or type
this
=SUM(,cell.then
You’ll
notice
select thatthe 100
towards
range with thethe
end.
mouse, Although
and
it’s
presspossible
Enter. to
put
Thisnumbers
will sum
in
thea values
formula in
like
cellsthis,
D3, we D4,
don’t
D5
Introduction to functions
and D6. to functions
Introduction
recommend
Your answer it
Functions
unless
should it’s be give
170. you the ability to do a variety of things, like perform mathematical operations, look up values or eve
absolutely
Now, let’s try AutoSum. Select the cell under the column for Meat (cell G7), then go to Formulas > AutoSum > select SUM. You
necessary.Functions give you the ability to do a variety of things, like perform mathematical
Go
Thisto the Formulas tab and browse through the Function Library, where functions are listed by category, like Text, Da
is known
Here’s
as operations,
a handy
a constant, look
keyboard up values
shortcut. or cell
Select even calculate
D15, dates
then press Altand times.
=, then Let’s
Enter. tryautomatically
This a few ways to enters SUM for y
and
Dive
When it’s
down easy
add
you for up
more
start values
detail
typing with the SUM function.
a function name after you press =, Excel will launch Intellisense, which will list all of the functio
EXTRA
to forget CREDIT
that
Try the COUNT
it’s there. We function using any of the methods you’ve already tried. The COUNT function counts the number of cells in a ra
recommend 1
Next step
referring
More about to functions
another cell
Now,
If the SUM
instead, let’s look at the
likefunction anatomy
could of a few
talk, it would say:functions. The
“Return the SUM
sum function
of all is structured
the values in cells D38like this: and all of column H”. SUM is
to D41,
cell F51. That2
way,
The it’s easily
TODAY function returns today’s date. It will automatically update when Excel recalculates.
TAKE
seen and A LOOK not AT THIS
Select
hiddenthese insidecells. Then in the bottom-right corner of the Excel window, look for SUM: 170 in the bottom bar. That’s called the
a formula.
More information on the web
All about the3SUM function
Use AutoSum to sum numbers
All about the COUNT function
Free Excel training online
Back to top Dive down for more detail
Next step

More about functions


Go to the Formulas tab and browse through the Function Library, where functions are
listed by category, like Text, Date & Time etc. Insert Function will let you search for
functions by name, and launch a function wizard that can help you build your formula.

When you start typing a function name after you press =, Excel will launch Intellisense,
which will list all of the functions starting with the letters you type. When you find the
one you want, press Tab, and Excel will automatically finish the function name and
enter the opening parenthesis for you. It will also display the optional and required
arguments.

Now, let’s look at the anatomy of a few functions. The SUM function is structured like
this:
If the SUM function could talk, it would say: “Return the sum of all the values in cells
D38 to D41, and all of column H”.

Now, let’s try one that doesn’t require any arguments.

More information on the web

Back to top

Free Excel training online


Go back to the top by pressing CTRL+HOME. To proceed to the next step, press CTRL+PAGE DOWN.
Introduction to functions
oduction to functions
ctions give you the ability to do a variety of things, like perform mathematical operations, look up values or eve
w, let’s try AutoSum. Select the cell under the column for Meat (cell G7), then go to Formulas > AutoSum > select SUM. You’ll see Excel aut
to theFunctions
Formulasgive you browse
tab and the ability to do the
through a variety of things,
Function Library,like perform
where mathematical
functions are listed by category, like Text, Date & Time etc
operations,
e’s a handy keyboard look up values
shortcut. or cell
Select even calculate
D15, dates
then press Altand times.
=, then Let’s
Enter. tryautomatically
This a few ways to enters SUM for y
eRA
endown add
you for
CREDIT up
more
start values
detail
typing with the SUM function.
a function name after you press =, Excel will launch Intellisense, which will list all of the functions starting wi
the COUNT function using any of the methods you’ve already tried. The COUNT function counts the number of cells in a range that contai
1 Under the Amount column for Fruit (cell D7), enter =SUM(D3:D6), or type
=SUM(, then select that range with the mouse and press Enter. This will sum
re about functions
w, SUM
he look atthe
let’s function the values
anatomy
could
in cells
of a D3,
talk, it wouldfew D4, D5 andThe
say:functions.
D6.SUM
“Return the sum
Your function
answer should be 170. this:
is structured
of all the values in cells D38like
to D41, and all of column H”. SUM is the function na
2 Now, let’s try AutoSum. Select the yellow cell under the column for Meat
TODAY function
KE A LOOK AT THIS returns today’s date. It will automatically update when Excel
(cell G7), then go to Formulas > AutoSum > select SUM. You’ll see Excel recalculates.
ect these cells. Then in the bottom-right
automatically enter thecorner
formulaof the ExcelPress
for you. window, looktofor
Enter SUM: 170
confirm in the bottom bar. That’s called the Status Bar, and
it. The
AutoSum feature has all of the most common functions.
re information on the web
about the3SUM Here’s
functiona handy keyboard shortcut. Select cell D15, then press Athen lt =
AutoSum to sum numbers
Enter. This automatically enters SUM for you.
about the COUNT function
e Excel training online
Dive down for more detail Next step

More about functions


Go to the Formulas tab and browse through the Function Library, where functions are
listed by category, like Text, Date & Time etc. Insert Function will let you search for
functions by name, and launch a function wizard that can help you build your formula.

When you start typing a function name after you press =, Excel will launch Intellisense,
which will list all of the functions starting with the letters you type. When you find the
one you want, press Tab, and Excel will automatically finish the function name and
enter the opening parenthesis for you. It will also display the optional and required
arguments.

Now, let’s look at the anatomy of a few functions. The SUM function is structured like
this:

The function The first Additional


name. argument. It’s arguments,
almost separated by
always commas (,).
required.
The function The first Additional
name. argument. It’s arguments,
almost separated by
always commas (,).
required.

=SUM(D38:D41,H:H)
If the SUM function could talk, it would say: “Return the sum of all the values in cells
D38 to D41, and all of column H”.

Now, let’s try one that doesn’t require any arguments.

The TODAY function returns today’s date. It will


automatically update when Excel recalculates.

=TODAY()

More information on the web


All about the SUM function

Use AutoSum to sum numbers

All about the COUNT function

Free Excel training online

Back to top Next step

e Excel training online


back to the top by pressing CTRL+HOME. To proceed to the next step, press CTRL+PAGE DOWN.
Fruit Amount Meat Amount
Apples 50 Beef 50
Oranges 20 Chicken 30
Bananas 60 Pork 10
Lemons 40 Fish 50
SUM > 170 SUM >

Item Amount Item Amount


Bread 50 Bread 50
Doughnuts 100 Doughnuts 100
Cookies 40 Cookies 40
Cakes 50 Cakes 50
Pies 20 Pies 20
SUM > COUNT >

EXTRA CREDIT
Try the COUNT function using any
of the methods you’ve already
tried. The COUNT function counts
the number of cells in a range that
contains numbers.

Fruit Amount
Apples 50 TAKE A LOOK AT THIS
Select these cells. Then, in the bottom-
Oranges 20 right corner of the Excel window, look for
Bananas 60 this:
Lemons 40
SUM > 170 That’s called the Status Bar, and it’s just
another way to quickly find a total and
other details about a selected cell or
range.
Item Amount
Cars 20
Lorries 10
Bikes 10
Skates 40

Total: Additional Value New Total


180 100 180

IMPORTANT DETAIL
Double-click this cell. You’ll notice the 100 towards the
end. Although it’s possible to put numbers in a formula
like this, we don’t recommend it unless it’s absolutely
necessary. This is known as a constant, and it’s easy to
forget that it’s there. We recommend referring to
another cell instead, like cell F51. That way, it’s easily
seen and not hidden inside a formula.
EXTRA CREDIT
Try using
TAKE A LOOK
MEDIAN or
AT
MODETHIS
AVERAGE here.
Select
AVERAGE function
functionany
range of gives
MEDIAN
Use thevalue
numbers,
you the AVERAGE
then function to get the average of numbers in a range of cells.
Select
look
in theUse
cell
theinmiddleD7,the AVERAGE
then function
use AutoSum to get
to add an the average function.
AVERAGE of numbers in a range of cells.
Status
of
Now Bar forcell G7, and enter an AVERAGE function by typing =AVERAGE(G3:G6).
theselect
data
an instant
set, while
In
Average.
MODE D15,1
cell gives you can use either AutoSum, or type to enter another AVERAGE function.
the one that
occurs
Activatethe
the previous sheet
most
Go to the
frequently. 2sheet
next

Links for more information on the web


3all about the AVERAGE function on the web
Select to learn
Select to learn all about the MEDIAN function on the web
Select to learn all about the MODE function on the web
Select to learn about free Excel training on the web
Previous
Previous

More information on the web


AVERAGE function
e the AVERAGE function to get the average of numbers in a range of cells.
ect cellUse
D7,the AVERAGE
then function
use AutoSum to get
to add an the average function.
AVERAGE of numbers in a range of cells.
w select cell G7, and enter an AVERAGE function by typing =AVERAGE(G3:G6).
cell D15,1 Select
you can use cell D7,AutoSum,
either then use or
AutoSum to addanother
type to enter an AVERAGE
AVERAGEfunction.
function.

vate the previous sheet


2sheetNow select cell G7, and enter an AVERAGE function by typing
to the next
=AVERAGE(G3:G6).
ks for more information on the web
3all about
ct to learn the AVERAGE
In cell D15, youfunction
can useoneither
the web
AutoSum, or type to enter another
AVERAGE function.
ct to learn all about the MEDIAN function on the web
ct to learn all about the MODE function on the web
ct to learn about free Excel training on the web
Previous
Previous Next
Next

More information on the web


All about the AVERAGE function

All about the MEDIAN function

All about the MODE function

Free Excel training online


Fruit Amount Meat Amount
Apples 50 Beef 50 TAKE A LOOK AT THIS
Select any range of numbers,
Oranges 20 Chicken 30 then look in the Status Bar for
Bananas 60 Pork 10 an instant Average.
Lemons 40 Fish 50
AVERAGE > AVERAGE >

Item Amount Item Amount


Bread 50 Bread 50
Doughnuts 100 Doughnuts 100
Cookies 40 Cookies 40
Cakes 50 Cakes 50
Pies 20 Pies 20
AVERAGE >

EXTRA CREDIT
Try using MEDIAN or MODE here.

MEDIAN gives you the value in


the middle of the data set, while
MODE gives the one that occurs
the most frequently.

More about the SUM function


In some of the above tips, we taught you how to use the SUM function. Here are more details about it.
Cells C37 to D41 contain data with two columns: Fruit and Amount.
The formula in cell D42: =SUM(D38:D41).
If the SUM function in cell D42 could talk, it would say this: Sum up the values in cells D38, D39, D40 and D41.
Here’s another way it can be used:
Cells C47 to D48 contain data with two columns: Item and Amount.

More information on the web


All about the SUM function
All about the SUMIF function
Use Excel as your calculator
Free Excel training online
Go back to the top by pressing CTRL+HOME. To proceed to the next step, press CTRL+PAGE DOWN.
K AT THIS
f numbers,
atus Bar for
.
GOOD TO
KNOW
You can use
either MIN or
MAX with
multiple ranges
or values to

MIN and MAX functions


show the
Select cell D7,
greater
MIN
In cellandorMAX
D15, youfunctions
then
Now
lesser use thecell
select
of those
can
Use use
the either
AutoSum
values, MIN function to get the minimum number in a range of cells.
G7,
the andlike
enter
AutoSum
Wizard to add aa
=MIN(A1:A10,B
Use
MAX the
Wizard,
MIN
Use
function
MAX the MIN function to get the smallest number in a range of cells.
or typefunction to get the maximum number in a range of cells.
function.
1:B10)
by typingor Use the MAX function to get the largest number in a range of cells.
to enter a
=MAX(A1:A10,B
=MAX(D3:D6). MIN
or
More
1), MAX
where B1
function.
contains a on
information
threshold
the web value, 1
like 10, in which
case the
All aboutwould
formula the MIN function
never the a2
return
All about MAX function
result less than
Free
10. Excel training online
3

Previous

More information on the web


You can use either MIN or MAX with multiple ranges or values to show the greater or lesser of those values, like =MIN(A1:A10,B1:B10) o

More information on the web


All about the MIN function
All about the MAX function
Use Excel as your calculator
Free Excel training online
MIN and MAX functions
N and MAX functions
the MIN function to get the minimum number in a range of cells.
Usefunction
the MAX the MIN function
to get to getnumber
the maximum the smallest number
in a range of cells.in a range of cells.
Use the MAX function to get the largest number in a range of cells.

1 Select cell D7, then use the AutoSum Wizard to add a MIN function.

about the MIN function


Now select cell G7, and enter a MAX function by typing =MAX(D3:D6).
about the 2MAX function
e Excel training online

3 In cell D15, you can use either the AutoSum Wizard, or type to enter a MIN
or MAX function.

Previous Next

More information on the web


can use either MIN or MAX with multiple ranges or values to show the greater or lesser of those values, like =MIN(A1:A10,B1:B10) or =MAX(A1:A10,1

re information on the web


All about the MIN function
about the MIN function
about the MAX function
All about the MAX function
Excel as your calculator
e Excel training online
Free Excel training online
Fruit Amount Meat Amount
Apples 50 Beef 50
Oranges 20 Chicken 30
Bananas 60 Pork 10
Lemons 40 Fish 50
MIN > MAX >

Item Amount Item Amount


Bread 50 Bread 50
Doughnuts 100 Doughnuts 100
Cookies 40 Cookies 40
Cakes 50 Cakes 50
Pies 20 Pies 20
MIN or MAX > 10

GOOD TO KNOW
You can use either MIN or MAX with multiple
=MIN(A1:A10,B1:B10) or =MAX(A1:A10,10).
ranges or values to show the greater or lesser of
those values, like =MIN(A1:A10,B1:B10) or
=MAX(A1:A10,B1), where B1 contains a threshold
value, like 10, in which case the formula would
never return a result less than 10.
calculates
want Excel to
someone’s
display
start and a end
negative
times, then
number
subtracts the
because
time theyyou took
haven’t
for lunch. The
entered
*24 at the your
end
birthday yet,
of the formula
In
youcell
can
converts D28,
use
the
enter
an
DateIF
which
like Date functions
=NOW(),
function
functions
fractional
will
Excelthis:
portioncan give
ofgive
the you the current date, based on your computer’s regional settings. You can also add and subtract Dates.
the
day current
=IF(D7="","",D
that Excel
Check
time,
7-D6), out
and the TODAY function, which gives you Today’s date. These are live, or volatile functions, so when you open your wor
will
which
sees into Excel can give you the current date, based on your computer’s regional settings. You
update
says,
hours.“IF each
D7
You’ll
Subtract
time
needExcel
equals Dates
to can also – Enter
addyour
andnext birthday
subtract in DD/MM/YY format in cell D7, and watch Excel tell you how many days away it is b
Dates.
calculates.
nothing, then
format the cell If
you
as a need
show
Add to– Let’s say you want to know which date a bill is due on, or when you need to return a library book. You can add da
nothing,
Dates
Number
change
otherwise
though. the
ToKNOW
1
do
GOOD
Time
show TO
format,
D7to
that,
Excel go
keeps dates and times based on the number of days starting from 1 January 1900. Times are kept in fractional portions o
you
minus
Home can go to
>D6”.
Ctrl+1
Format>> Cells
Number
(Ctrl+1) >>
Time functions
Time > Select
Number
Excel
the can>give
format 2you the current time, based on your computer’s regional settings. You can also add and subtract times. For insta
Number >2
you want.
decimals.

3
If this formula could talk, it would say: “Take the Time Out and subtract it from the Time In, then subtract the Lunch Out/In Tim
Previous
Next
More information on the web
All about the TODAY function
All about the NOW function
All about the DATE function
Free Excel training online
Time functions
Excel can give you the current time, based on your computer’s regional settings. You
can also add and subtract times. For instance, you might need to keep track of how
many hours an employee worked each week, and calculate their pay and overtime.

3
Previous

More information on the web


Date functions
el can give you the current date, based on your computer’s regional settings. You can also add and subtract Dates.
eck out the TODAY function, which gives you Today’s date. These are live, or volatile functions, so when you open your workbook tomorrow
Excel can give you the current date, based on your computer’s regional settings. You
tract Dates – Enter
can also addyour
andnext birthday
subtract in DD/MM/YY format in cell D7, and watch Excel tell you how many days away it is by using =D7-D6
Dates.

d Dates – Let’s say you want to know which date a bill is due on, or when you need to return a library book. You can add days to a date to fi
1 Take a look at the TODAY function, which gives you Today’s date. These
OD TO KNOW are live, or volatile functions, so when you open your workbook tomorrow,
el keeps dates and times based on the number of days starting from 1 January 1900. Times are kept in fractional portions of a day based o
it will have tomorrow’s date. Enter =TODAY() in cell D6.

2you the
el can give Subtract
currentDates
time, –based
Enteron
your next
your birthdayregional
computer’s in DD/MM/YY
settings.format in also
You can cell D7,
add and subtract times. For instance, you might
and watch Excel tell you how many days away it is by using =D7-D6 in cell D8.

3 Add Dates – Let’s say you want to know which date a bill is due on, or when
his formula could talk,
you it would
need say: “Take
to return the Time
a library book.Out
Youand subtract
can it from
add days to athe Time
date to In,
findthen
out.subtract
In the Lunch Out/In Times, then multi
cell D10, enter a random number of days. In cell D11, we added =D6+D10
to calculate the due date from today.
re information on the web
about the TODAY function
about the NOW function
about the DATE function
e Excel training online
Time functions
Excel can give you the current time, based on your computer’s regional settings. You
can also add and subtract times. For instance, you might need to keep track of how
many hours an employee worked each week, and calculate their pay and overtime.

1 In cell D28, enter =NOW(), which will give the current time, and will
update each time Excel calculates. If you need to change the Time format,
you can go to Ctrl+1 > Number > Time > Select the format you want.

2 Add up hours between times – In cell D36 we’ve entered =((D35-D32)-


(D34-D33))*24, which calculates someone’s start and end times, then
subtracts the time they took for lunch. The *24 at the end of the formula
converts the fractional portion of the day that Excel sees into hours. You’ll
need to format the cell as a Number though. To do that, go to Home >
Format > Cells (Ctrl+1) > Number > Number > 2 decimals.

3 If this formula could talk, it would say: “Take the Time Out and subtract it
from the Time In, then subtract the Lunch Out/In Times, then multiply
those by 24 to convert Excel’s fractional time to hours”, or =((Time In -
Time Out)-(Lunch In - Lunch Out))*24.
*24 to convert Excel’s
fraction of a day to
hours
*24 to convert Excel’s
fraction of a day to
Time Out Lunch Out hours

=((D35-D32)-(D34-D33))*24

Time In Lunch In

The inner parentheses () make sure Excel calculates those


parts of the formula by themselves. The outer
parentheses make sure Excel multiplies the final inner result by
24.

Previous Next

More information on the web


All about the TODAY function

All about the NOW function

All about the DATE function

Free Excel training online


ubtract Dates.
en you open your workbook tomorrow, it will have tomorrow’s date. Enter =TODAY() in cell D6.

many days away it is by using =D7-D6 in cell D8.

Date functions
Today’s date:
Your birthday: IMPORTANT DETAIL
Days until your birthday: If you don’t want Excel to display a negative number,
because you haven’t entered your birthday yet, you
ubtract times. For instance, you might need to keep track of how many hours anan
can use employee worked
IF function each=IF(D7="","",D7-D6),
like this: week, and calculate their pay and
which says, “IF D7 equals nothing, then show nothing,
Grace period days: otherwise show D7 minus D6”.
Bill due on:
ct the Lunch Out/In Times, then multiply those by 24 to convert Excel’s fractional time to hours”, or =((Time In - Time Out)-(Lunch In - Lunc

GOOD TO KNOW
Excel keeps dates and times based on the number of
days starting from 1 January 1900. Times are kept in
fractional portions of a day based on minutes. So 12:30
PM on 01/01/2017 is actually stored as 42736.5208. If
the Time or Date show up as numbers like that, then
you can press Ctrl+1 > Number > select a Date or Time
format.

Time functions
Current Time:

Daily Hours Worked


Time In: 8:00 AM
Lunch Out: 12:00 PM
Lunch In: 1:00 PM
Time Out: 5:00 PM
Total Hours: 8
Static Date & Time
Date: 27/09/17
Time: 8:52 AM

GOOD TO KNOW
You can use keyboard shortcuts to enter Dates
and Times that won’t continuously change:

Date – Ctrl+;
Time – Ctrl+Shift+:
ative number,
hday yet, you
and calculate their pay and overtime.
"","",D7-D6),
show nothing,

- Time Out)-(Lunch In - Lunch Out))*24.


Joining text from different cells
Joining text from different cells
There are many times in Excel when you want to join text that’s in different cells. This example is very common, where you ha
WORTH
In cell E3, There
EXPLORING enter =D3&C3
are manyto times
join theinsurnames
Excel whenandyou
firstwant
names.to join text that’s in different cells. This
If you don’t example
SmithNancy
don’t
In cellknow doesn’tislook
C36,combine
veryquite
common, where We
right though. youneed
havetofirst
addnames
a comma andand
surnames, and
a space. To dowant
that, to
we’ll use quotes to create a ne
TAKE A LOOK
which=C28&"
format them as first name, surname or full name. Fortunately, Excel lets us do that
enter
AT
To
codeTHIS
create
to the
with
use, full
the name, we’ll
Ampersand join first
(&) name
sign, and
which surname,
you can but
enter use a
withspace without
Shift+7. a comma. In F3, enter =C3&" "&D3.
"&TEXT(D28,"
Formulas,
you can use
YYYY-MM-
especially
Ctrl+1 > big
DD").
Dive YYYY-
down for more detail
ones,
Number
MM-DD
Next
can to
is 1
the
sometimes
format any be
UK format
Using
hard
cell totext
the read,and numbers together
code forway
Year-
but
Now, you can
you want. use the & to join text and numbers, not just text and text
we’ll
Month-Day,
break
Then up their
select
like 2017-09-
2
parts
Look
the with
at cells C28:D29. See how the date and times are in separate cells? You can join them together with the & symbol like yo
25. Custom
spaces
option.like
You
this:
can copy the
In cell C37, enter =C29&" "&TEXT(D29,"HH:MM AM/PM"). HH:MM AM/PM is the UK format code for Hours:Minutes AM or PM
format code
=C28
that’s& " " &
TEXT(D28,"YY
displayed back
YY-MM-DD")
3
to your
formula.
More information on the web
All about the TEXT function
Combine text and numbers Dive down for more detail
Free Excel training online

Using text and numbers together


Now, we’ll use the & to join text and numbers, not just text and text

Look at cells C28:D29. See how the date and times are in separate cells? You can join
them together with the & symbol like you’ll see in cells C32:C33, but that doesn’t
look right, does it? Unfortunately, Excel doesn’t know how you want to format the
numbers, so it breaks them down to their basest format, which is the Serial date in
this case. We need to explicitly tell Excel how to format the number portion of the
formula, so it displays the way you want in the resulting text string. You can do that
with the TEXT function and a format code.

1
1

Previous
2

More information on the web


Joining text from different cells
ning text from different cells
re are many times in Excel when you want to join text that’s in different cells. This example is very common, where you have first names a

ell E3, There


enter =D3&C3 to times
are many join the
insurnames andyou
Excel when firstwant
names.
to join text that’s in different cells. This
example
thNancy doesn’tislook
veryquite
common, where We
right though. youneed
havetofirst
addnames
a commaandand
surnames, and
a space. To dowant
that, to
we’ll use quotes to create a new text string. T
combine them as first name, surname or full name. Fortunately, Excel lets us do that
create with
the full
thename, we’ll join(&)
Ampersand first name
sign, and surname,
which but use
you can enter a space
with without a comma. In F3, enter =C3&" "&D3.
Shift+7.

e down for more


Indetail
1 cell E3, enter =D3&C3 to join the surnames and first names.

ng text and numbers together


w, we’ll use the SmithNancy
& to join text doesn’t
and numbers, not just textthough.
and textWe need to add a comma
2 look quite right
andSee
k at cells C28:D29. a space. Todate
how the do that, we’ll use
and times quotes
are in to create
separate a new
cells? You can text string.together
join them This with the & symbol like you’ll see in cells C
time, enter =D3&", "&C3. The &", "& portion lets us join a comma and
space with
ell C37, enter =C29&" the text in the cells.
"&TEXT(D29,"HH:MM AM/PM"). HH:MM AM/PM is the UK format code for Hours:Minutes AM or PM, like 1:30 PM.

3 To create the full name, we’ll join first name and surname, but use a space
without a comma. In F3, enter =C3&" "&D3.

re information on the web


about the TEXT function
mbine text and numbers
Dive down for more detail Next
e Excel training online

Using text and numbers together


Now, we’ll use the & to join text and numbers, not just text and text

Look at cells C28:D29. See how the date and times are in separate cells? You can join
them together with the & symbol like you’ll see in cells C32:C33, but that doesn’t
look right, does it? Unfortunately, Excel doesn’t know how you want to format the
numbers, so it breaks them down to their basest format, which is the Serial date in
this case. We need to explicitly tell Excel how to format the number portion of the
formula, so it displays the way you want in the resulting text string. You can do that
with the TEXT function and a format code.

1 In cell C36, enter =C28&" "&TEXT(D28,"YYYY-MM-DD"). YYYY-MM-DD


is the UK format code for Year-Month-Day, like 2017-09-25.
1 In cell C36, enter =C28&" "&TEXT(D28,"YYYY-MM-DD"). YYYY-MM-DD
is the UK format code for Year-Month-Day, like 2017-09-25.
Previous Next
2 In cell C37, enter =C29&" "&TEXT(D29,"HH:MM AM/PM"). HH:MM
AM/PM is the UK format code for Hours:Minutes AM or PM, like 1:30 PM.

More information on the web


All about the TEXT function

Combine text and numbers

Free Excel training online


First Name Surname Surname, First Name Full Name

Nancy Smith Smith, Nancy Nancy Smith

Andy North

Jan Kotas
Maria Jones
Steven Thorpe
Michael Neipper

Robert Zare
Yvonne McKay
ours:Minutes AM or PM, like 1:30 PM.

Using text & numbers


Today’s date: 24/09/23
Current time: 12:55 PM
TAKE A LOOK AT THIS
Joining text & numbers Formulas, especially big ones, can
sometimes be hard to read, but you can
Today’s date: 45193 break up their parts with spaces like this:
Current time: 45193.5387939041
=C28 & " " & TEXT(D28,"YYYY-MM-DD")
Formatting text & numbers
Today’s date: 2023-09-24
Current time: 12:55 PM

WORTH EXPLORING
If you don’t don’t know which format code to use,
you can use Ctrl+1 > Number to format any cell the
way you want. Then select the Custom option. You
can copy the format code that’s displayed back to
your formula.
WORTH EXPLORING
If you don’t don’t know which format code to use,
you can use Ctrl+1 > Number to format any cell the
way you want. Then select the Custom option. You
can copy the format code that’s displayed back to
your formula.
D12.toWe’ve
F35
got you
“Delivery”. As
started
you startwith
=IF(C12<100,"
typing,
In cell F33, Excel’s
Less than
auto-correct,
we’ve entered
Next,
100","Greater
should we’ve
find it
In
Copy
added cellD9
=IF(E33="Yes", D9
an toIF
than
for
enter you.
F31*VAT,0), or equal
When
D10.
statement
to
it 100").
does, The press to
=IF(C9="Apple
where
answer
calculate we’ve
here
What
Tab to
",TRUE,FALSE)
set happens
up VATenter as
should
delivery
if
it. you be
enter
Thiscorrect
is ifait’sa
a.required.
The
Named
FALSE,
IF
Named
answer
Range
EXPERT
because
cell
IF
and
IF statements
statements
number
F35,
statements
greater
TRUE. we’ve
TIP
In
Range,
is
with an a allow you to make logical comparisons between conditions. An IF statement generally says that if one condition
you’ll
than
value
Named
orange
see of is not
or equalOur
entered
0.0825. itto
Ranges
an apple.
=IF(E35="Yes",
100 allow
inFormulas
cell
from
formula says If
you to define
SUM(D28:D29 IF statements allow you to make logical comparisons between conditions. An IF
>C12?
Define
cell E33 equals
terms
)*1.25,0). or statement
This generally says that if one condition is true, do something, otherwise do
Name.
Yes, thenNow, if
values
says “Ifincell a
you
multiplyever
IMPORTANT need
cell DETAIL
something else. The formulas can return text, values or even more calculations.
single
E35 place,
is and
Yes,
to
TRUE
F31 change
by VAT, FALSE are unlike other words in Excel formulas in that they don’t need to be in quotes, and Excel will automatically c
and then
then take the
your VAT
=IF(C3="Apple","Yes","No")
otherwise
reuse
sum ofthem
the
charges,
return
Dive a 0.
down you for
throughout
Quantity a more detail
only
workbook.have to 1
Next
column
do itchangingin the
in one
Try
You
table canabovesee all
IF statement
place, and with another function
Yes
of
and theto No inyou
named
multiply itcan also force additional calculations to be performed if a certain condition is met. Here, we’re going to evaluate
IF
canstatements
cell use the
E33intothis see
ranges
by 1.25,
Delivery
the name
calculation
workbook
otherwise by 2
anywhere
change. in
going
return to
a 0”.
the workbook.
Formulas >
Name
Manager. Click
GOOD
3
here toTO learn KNOW
When
more. you create a formula, Excel will automatically place coloured borders around any ranges referenced in the formula, and

Previous
Next
More information on the web
Dive down for more detail
All about the IF function
All about the IFS function
Advanced IF statements
Free Excel training online

IF statement with another function


IF statements can also force additional calculations to be performed if a certain
condition is met. Here, we’re going to evaluate a cell to see if VAT should be charged,
and calculate it if the condition is true.

3
3

Previous

More information on the web


IF statements
tatements allow you to make logical comparisons between conditions. An IF statement generally says that if one condition is true, do som

IF statements allow you to make logical comparisons between conditions. An IF


statement generally says that if one condition is true, do something, otherwise do
PORTANT DETAIL else. The formulas can return text, values or even more calculations.
something
UE and FALSE are unlike other words in Excel formulas in that they don’t need to be in quotes, and Excel will automatically capitalise them.
C3="Apple","Yes","No")
e down for more detail
1 In cell D9 enter =IF(C9="Apple",TRUE,FALSE). The correct answer is TRUE.
tatement with another function
tatements can also force additional calculations to be performed if a certain condition is met. Here, we’re going to evaluate a cell to see if
2 Copy D9 to D10. The answer here should be FALSE, because an orange is
not an apple.

3 Try another example by looking at the formula in cell D12. We’ve got you
OD TO KNOW started with =IF(C12<100,"Less than 100","Greater than or equal to
en you create a formula, Excel will automatically place coloured borders around any ranges referenced in the formula, and the correspond
100"). What happens if you enter a number greater than or equal to 100
in cell C12?

re information on the web


Dive down for more detail Next
about the IF function
about the IFS function
vanced IF statements
e Excel training online

IF statement with another function


IF statements can also force additional calculations to be performed if a certain
condition is met. Here, we’re going to evaluate a cell to see if VAT should be charged,
and calculate it if the condition is true.

1 In cell F33, we’ve entered =IF(E33="Yes",F31*VAT,0), where we’ve set up


VAT as a Named Range with a value of 0.0825. Our formula says If cell E33
equals Yes, then multiply cell F31 by VAT, otherwise return a 0.

Try changing Yes to No in cell E33 to see the calculation change.

2 Next, we’ve added an IF statement to calculate delivery if it’s required. In


cell F35, you’ll see =IF(E35="Yes",SUM(D28:D29)*1.25,0). This says “If
cell E35 is Yes, then take the sum of the Quantity column in the table above
and multiply it by 1.25, otherwise return a 0”.

3 Next, change the 1.25 in the formula in cell F35 to “Delivery”. As you start
typing, Excel’s auto-correct, should find it for you. When it does, press Tab
to enter it. This is a Named Range, and we’ve entered it from Formulas >
Define Name. Now, if you ever need to change your VAT charges, you
only have to do it in one place, and you can use the Delivery name
3 Next, change the 1.25 in the formula in cell F35 to “Delivery”. As you start
typing, Excel’s auto-correct, should find it for you. When it does, press Tab
to enter it. This is a Named Range, and we’ve entered it from Formulas >
Define Name. Now, if you ever need to change your VAT charges, you
only have to do it in one place, and you can use the Delivery name
anywhere in the workbook.

Previous Next

More information on the web


All about the IF function

All about the IFS function

Advanced IF statements

Free Excel training online


s that if one condition is true, do something, otherwise do something else. The formulas can return text, values or even more calculations

cel will automatically capitalise them. Numbers don’t need to be in quotes either. Regular text, like Yes or No, needs to be in quotes like th

IF statements
Apple

Orange

50 Less than 100


IMPORTANT DETAIL
TRUE and FALSE are unlike other words in Excel formulas
ed in the formula, and theincorresponding ranges
that they don’t need in
tothe
be informula
quotes,will
and beExcel
the same
will colour. You can see this if you select cell F33 and press F2
automatically capitalise them. Numbers don’t need to be
in quotes either. Regular text, such as Yes or No, does
need to be in quotes like this:
=IF(C3="Apple","Yes","No")

Item Quantity Cost Total


Widget 2 £9.76 £19.52
Doohickey 3 £3.42 £10.26

Sub-Total £13.18 £29.78


GOOD TO KNOW
When you create a formula, Excel will autom
VAT? Yes £2.46 place coloured borders around any ranges
referenced in the formula, and the correspon
Delivery? Yes £6.25 ranges in the formula will be the same colour
can see this if you select cell F33 and press F2
the formula.
Total £38.48

EXPERT TIP
Named Ranges allow you to define terms or values in a
single place, and then reuse them throughout a
workbook. You can see all of the named ranges in this
workbook by going to Formulas > Name Manager.
Click here to learn more.
EXPERT TIP
Named Ranges allow you to define terms or values in a
single place, and then reuse them throughout a
workbook. You can see all of the named ranges in this
workbook by going to Formulas > Name Manager.
Click here to learn more.
alues or even more calculations.

No, needs to be in quotes like this:

you select cell F33 and press F2 to edit the formula.

KNOW
eate a formula, Excel will automatically
ed borders around any ranges
n the formula, and the corresponding
formula will be the same colour. You
f you select cell F33 and press F2 to edit
still want to
existing
suppress the
In cell D22,
VLOOKUP
#N/A
enter error,
formula
you like
can use
=VLOOKUP(C2
this in cell
an error
2,C17:D20,2,F
D43:
handling
ALSE). The
function called
correct
=IF(C43="","",
IFERROR in
answer
VLOOKUP(C43 for
cell
ApplesG43: is 50.
,C37:D41,2,FA
=IFERROR(VLO
VLOOKUP
LSE))
VLOOKUP
looked
Now,
Apples,
VLOOKUP
OKUP(F43,F37
VLOOKUP forfor
try
:G41,2,FALSE),
found
is one of the most widely used functions in Excel (and one of our favourites too!). VLOOKUP lets you look up a value
yourself
This
""). saysinthat
IFERROR the
it,
Meat
if then
cell went
=VLOOKUP(A1,B:C,2,FALSE)
section,
C43
says
over that if the
in cellone
equals
What G22.
do VLOOKUP
nothing is one of the most widely used functions in Excel (and one of our
VLOOKUP
column
You
(""), toyou
should
then thewant to look for?
returns
If you
right favourites
a valid
find
and too!). VLOOKUP
it, how many columns to thelets
rightyou lookwant
do you up atovalue
get ainvalue?
a column on the left, then
end
return
result,up with
then
returned
Where dothe
=VLOOKUP(F2
nothing, returns
you want information in another column to the right if it finds a match. VLOOKUP says:
to look for it?
display
amount. that,
2,F17:G20,2,F
otherwise
Do you want an exact or approximate match?
otherwise,
ALSE).
return
displaythe
VLOOKUP’s
nothing ("").
results.
EXPERIMENT
We Note
displayed
the second
Try selecting
nothing here different items from the drop-down lists. You’ll see the result cells instantly update themselves with new values.
closing
(""), but youfor more detail
Dive down
parenthesis
can also use at
Next
the end of(0,1,
numbers the
formula.
VLOOKUP
2 This
and
etc.), or text, #N/A
Invariably,
closes you’ll run into a situation where VLOOKUP can’t find what you asked it to, and it returns an error (#N/A). Sometime
such asthe IF
statement.
“Formula isn’tDETAIL
IMPORTANT
correct”. is what’s known as a blanket error handler, meaning it will suppress any error your formula might throw. This can cau
IFERROR

A rule of thumb is to not add error handlers to your formulas until you’re absolutely certain they work properly.
Previous
Next
More information on the web
All about the VLOOKUP function
1
All about the INDEX/MATCH functions
All about the IFERROR function
Use PivotTables to analyse worksheet data
2 online
Free Excel training

Dive down for more detail

VLOOKUP and #N/A


Invariably, you’ll run into a situation where VLOOKUP can’t find what you asked it to,
and it returns an error (#N/A). Sometimes, it’s because the lookup value simply
doesn’t exist, or it can because the reference cell doesn’t have a value yet.

1
2

Previous

More information on the web


VLOOKUP
OOKUP is one of the most widely used functions in Excel (and one of our favourites too!). VLOOKUP lets you look up a value in a column on

OOKUP(A1,B:C,2,FALSE)
VLOOKUP
at do you want to is one
look of the most widely used functions in Excel (and one of our
for?
ou find it, how many columns to thelets
favourites too!). VLOOKUP rightyou lookwant
do you up atovalue
get ainvalue?
a column on the left, then
ere doreturns
you wantinformation in another column to the right if it finds a match. VLOOKUP says:
to look for it?
you want an exact or approximate match?
What do you If you find it, how many
want to look columns to the right do
ERIMENT for? you want to get a value?
selecting different items from the drop-down lists. You’ll see the result cells instantly update themselves with new values.
e down for more detail

OOKUP
ariably,and =VLOOKUP(A1,B:C,2,FALSE)
#N/A
you’ll run into a situation where VLOOKUP can’t find what you asked it to, and it returns an error (#N/A). Sometimes, it’s because t

PORTANT DETAIL
RROR is what’s known as a blanket error handler, meaning it will suppress any error your formula might throw. This can cause problems if
Where do Do you want
ule of thumb is to not add error handlers to your formulas until an
you want to exactabsolutely
you’re or certain they work properly.
look for it? approximate
match?

re information on the web


about the VLOOKUP function
1 In cell D22,
about the INDEX/MATCH
enter =VLOOKUP(C22,C17:D20,2,FALSE). The correct answer
functions
for Apples is 50. VLOOKUP looked for Apples, found it, then went over one
about the IFERROR function
column to the right and returned the amount.
PivotTables to analyse worksheet data
2 online
e Excel training Now, try for yourself in the Meat section, in cell G22. You should end up
with =VLOOKUP(F22,F17:G20,2,FALSE).

Dive down for more detail Next

VLOOKUP and #N/A


Invariably, you’ll run into a situation where VLOOKUP can’t find what you asked it to,
and it returns an error (#N/A). Sometimes, it’s because the lookup value simply
doesn’t exist, or it can because the reference cell doesn’t have a value yet.

1 If you know your lookup value exists, but want to hide the error if the lookup
cell is blank, you can use an IF statement. In this case, we’ll wrap our existing
VLOOKUP formula like this in cell D43:

=IF(C43="","",VLOOKUP(C43,C37:D41,2,FALSE))
If you know your lookup value exists, but want to hide the error if the lookup
cell is blank, you can use an IF statement. In this case, we’ll wrap our existing
VLOOKUP formula like this in cell D43:

=IF(C43="","",VLOOKUP(C43,C37:D41,2,FALSE))

This says, “If cell C43 equals nothing (""), then return nothing, otherwise
return the VLOOKUP’s results”. Note the second closing parenthesis at the
end of the formula. This closes the IF statement.

2 If you aren’t sure your lookup value exists, but you still want to suppress
the #N/A error, you can use an error handling function called IFERROR in
cell G43: =IFERROR(VLOOKUP(F43,F37:G41,2,FALSE),""). IFERROR says,
“If the VLOOKUP returns a valid result, then display that, otherwise, display
nothing ("")”. We displayed nothing here (""), but you can also use numbers
(0,1, 2 etc.), or text, such as “Formula isn’t correct”.

Previous Next

More information on the web


All about the VLOOKUP function

All about the INDEX/MATCH functions

All about the IFERROR function

Use PivotTables to analyse worksheet data

Free Excel training online


ets you look up a value in a column on the left, then returns information in another column to the right if it finds a match. VLOOKUP says:

elves with new values.

rror (#N/A). Sometimes, it’s because the lookup value simply doesn’t exist, or it can because the reference cell doesn’t have a value yet.

Fruit Amount Meat Amount


Apples 50 Beef 50
Oranges 20 Chicken 30
Bananas 60 Pork 10
Lemons 40 Fish 50

Apples Pork

EXPERIMENT
Try selecting different items from the drop-down lists.
You’ll see the result cells instantly update themselves with
new values.

If the SUM function in cell D42 could talk, it would say this: Sum up the values in cells D38, D39, D40 and D41.
Item Amount Item Amount
Bread 50 Bread 50
Doughnuts 100 Doughnuts 100
Cookies 40 Cookies 40
Cakes 50 Cakes 50
Pies 20 Pies 20
#N/A Pastry

IMPORTANT DETAIL
IFERROR is what’s known as a blanket error handler, meaning
it will suppress any error your formula might throw. This can
cause problems if Excel is giving you a notification that your
formula has a legitimate error that needs to be fixed.

A rule of thumb is to not add error handlers to your formulas


until you’re absolutely certain they work properly.
ds a match. VLOOKUP says:

doesn’t have a value yet.


Conditional functions – SUMIF
Conditional functions – SUMIF
Conditional functions let you sum, average, count or get the min. or max. of a range based on a given condition, or cr
SUMIF lets you sum in one range based on a specific criteria you look for in another range, like how many Apples y
Conditional functions let you sum, average, count or get the min. or max. of a range
=SUMIF(C3:C14,C17,D3:D4)
based on a given condition, or criteria you specify. Such as: out of all the fruits in the
Which range do you want to look at?
list, how many are apples? Or, how many oranges are the Florida type?
What value
EXPERT TIP (text or number) do you want to look for?
Each
For onematch
each of found, which range
SUMIFS
the Fruitisand the same as SUMIF, but itdo
letsyou
youwant
use to sum in?
multiple criteria. So in this example, you can look for Fruit and Type, instead o
Type cells has
1
a=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17)
drop-down
COUNTIFS is
list
the
Whichwhere
same youdo you want to sum?
as
range
can
SUMIF,
This select
is butfirst
it range to look in for matches
This is the
different the
lets
secondyourange
use
This
fruits.is Try
multiple
to look the criteria for the first match
it,
in for
and
matchesSo the
watch
criteria. in
formulas
this example,
This is the
automatically criteria for the second match
you can look
update.
for Fruit and
Type,
Dive downinstead for more detail
of just by
Next
Fruit.step
Select
Conditional
cell H64 andfunctions – COUNTIF
type
COUNTIF and COUNTIFS let you count values in a range based on a criterion you specify. They’re a bit different from the other
=COUNTIFS(F5
Select cell D64 and type =COUNTIF(C50:C61,C64). COUNTIF is structured like this:
0:F61,F64,G50
=COUNTIF(C50:C61,C64)
:G61,G64).
COUNTIFS
Which range is do you want to look at?
structured like
What value 2
this: (text or number) do you want to look for?

=COUNTIFS(F50:F61,F64,G50:G61,G64)
You’ve already seen SUMIF, SUMIFS, COUNTIF and COUNTIFS. Now you can try on your own with the other functions, such as
This is the first range to count
This is the
SUMIF criteria for the first match
=SUMIF(C92:C103,C106,E92:E103)
SUMIFS =SUMIFS(E92:E103,C92:C103,C106,D92:D103,D106)
This is the second range to count
AVERAGEIF =AVERAGEIF(C92:C103,C106,E92:E103)
This is criteria for the second match
AVERAGEIFS=AVERAGEIFS(E92:E103,C92:C103,C106,D92:D92,D106)
Dive down=COUNTIF(C92:C103,C106)
COUNTIF for more detail
COUNTIFS
Next =COUNTIFS(C92:C103,C106,D92:D103,D106)
MAXIFS =MAXIFS(E92:E103,C92:C103,C10,D92:D103,D106)
More
MINIFSconditional functions
=MINIFS(E92:E103,C92:C103,C106,D92:D103,D106)
=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17)
Dive down for more detail
Next
SUMIF with a value argument
Here’s an example of the SUMIF function using greater than (>) to find all values greater than a given amount:
=SUMIF(D118:D122,">50")

Sum up some values based on this criterion:


....Look through these cells...

...and if the value is greater than 50, sum it up.


NOTE: If you find you are making a lot of conditional formulas, you might find that a PivotTable is a better solution. See this Piv
More information on thedown
Dive web for more detail
All about the SUMIF function
All about the SUMIFS function
All about the COUNTIF function
Conditional functions – COUNTIF
All about the COUNTIFS function
All about the AVERAGEIF function
All about the AVERAGEIFS
COUNTIF function let you count values in a range based on a criterion you
and COUNTIFS
All about the MINIFS
specify. function
They’re a bit different from the other IF and IFS functions, in that they only
All about the MAXIFS function
have a criteria range and criteria. They don’t evaluate one range then look in another
Create a drop-down list
to summarise.
Free Excel training online
Back to top 1
Next

=COUNTIFS(F50:F61,F64,G50:G61,G64)

Dive down for more detail

More conditional functions


More conditional functions
You’ve already seen SUMIF, SUMIFS, COUNTIF and COUNTIFS. Now you can try on
your own with the other functions, such as AVERAGEIF/S, MAXIFS, MINIFS. They’re
all structured the same way, so once you get one formula written, you can just
replace the function name with the one you want. We’ve written all the functions
you’ll need for cell E106, so you can copy/paste these, or try to type them yourself for
practice.

SUMIF =SUMIF(C92:C103,C106,E92:E103)
SUMIFS =SUMIFS(E92:E103,C92:C103,C106,D92:D103,D106)
AVERAGEIF =AVERAGEIF(C92:C103,C106,E92:E103)
AVERAGEIFS =AVERAGEIFS(E92:E103,C92:C103,C106,D92:D92,D106)
COUNTIF =COUNTIF(C92:C103,C106)
COUNTIFS =COUNTIFS(C92:C103,C106,D92:D103,D106)
MAXIFS =MAXIFS(E92:E103,C92:C103,C106,D92:D103,D106)
MINIFS =MINIFS(E92:E103,C92:C103,C106,D92:D103,D106)

Dive down for more detail

SUMIF with a value argument


Here’s an example of the SUMIF function using greater than (>) to find all values
greater than a given amount:

Sum up some
values based
on this
criterion:

=SUMIF(D118:D122,">50")

NOTE: If you find you are making a lot of conditional formulas, you might find that a
PivotTable is a better solution. See this PivotTable article for more information.

More information on the web


Back to top
Conditional functions – SUMIF
nditional functions – SUMIF
nditional functions let you sum, average, count or get the min. or max. of a range based on a given condition, or cr
MIF lets you sum in one range based on a specific criteria you look for in another range, like how many Apples y
Conditional functions let you sum, average, count or get the min. or max. of a range
UMIF(C3:C14,C17,D3:D4)
based on a given condition, or criteria you specify. Such as: out of all the fruits in the
ich range do you want to look at?
list, how many are apples? Or, how many oranges are the Florida type?
at value (text or number) do you want to look for?
eachismatch
MIFS found,
the same which range
as SUMIF, but itdo
letsyou
youwant
use to sum in?
multiple criteria. So in this example, you can look for Fruit and Type, instead of just by Fruit.
1 SUMIF lets you sum in one range based on a specific criteria you look for
in another range, like how many Apples you have. Select cell D17 and type
UMIFS(H3:H14,F3:F14,F17,G3:G14,G17)
ich range do you=SUMIF(C3:C14,C17,D3:D14).
want to sum? SUMIF is structured like this:
s is the first range to look in for matches
Which range do you
s is the criteria for the first match For each match found, which
want to look at? range do you want to sum in?

s is the criteria for the second match

=SUMIF(C3:C14,C17,D3:D4)
e down for more detail

nditional functions – COUNTIF


UNTIF and COUNTIFS let you count values in a range
What valuebased
(text on a criterion you specify. They’re a bit different from the other IF and IFS func
or number)
ect cell D64 and type =COUNTIF(C50:C61,C64). COUNTIF
do you want toislook
structured
for? like this:
OUNTIF(C50:C61,C64)
ich range do you want to look at?
at value 2 SUMIFS
(text or number)isdo theyou
same
wantastoSUMIF, but it lets you use multiple criteria. So in this
look for?
example, you can look for Fruit and Type, instead of just by Fruit. Select cell
H17 and type =SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17). SUMIFS is
OUNTIFS(F50:F61,F64,G50:G61,G64)
’ve already seen SUMIF, SUMIFS,
structured COUNTIF and COUNTIFS. Now you can try on your own with the other functions, such as AVERAGEIF/S, M
s is the first range to countlike this:
s is the
MIF criteria for the firstWhich
matchrange
=SUMIF(C92:C103,C106,E92:E103) This is the This is the
MIFS =SUMIFS(E92:E103,C92:C103,C106,D92:D103,D106)
s is the second range to countdo you want criteria for criteria for
ERAGEIF =AVERAGEIF(C92:C103,C106,E92:E103)
to sum? the first the second
s is criteria for the second match
ERAGEIFS=AVERAGEIFS(E92:E103,C92:C103,C106,D92:D92,D106) match match
e down=COUNTIF(C92:C103,C106)
UNTIF for more detail
UNTIFS =COUNTIFS(C92:C103,C106,D92:D103,D106)
XIFS =MAXIFS(E92:E103,C92:C103,C10,D92:D103,D106)
re conditional
NIFS functions
=MINIFS(E92:E103,C92:C103,C106,D92:D103,D106)
=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17)
e down for more detail

MIF with a value argument


e’s an example of the SUMIF function using This is the
greater Thisgreater
than (>) to find all values is the than a given amount:
UMIF(D118:D122,">50") first range to second range
look in for to look in for
matches matches
m up some values based on this criterion:
ook through these cells...

nd if the value is greater than 50, sum it up.


Next
Next
TE: If you find you are making a lot of conditional formulas, you might find that a PivotTable is a better solution. See this PivotTable article
re information on Divethedown
web for more detail
about the SUMIF function
about the SUMIFS function
about the COUNTIF function
Conditional functions – COUNTIF
about the COUNTIFS function
about the AVERAGEIF function
about the AVERAGEIFS
COUNTIF function let you count values in a range based on a criterion you
and COUNTIFS
about the MINIFS
specify. function
They’re a bit different from the other IF and IFS functions, in that they only
about the MAXIFS function
have a criteria range and criteria. They don’t evaluate one range then look in another
ate a drop-down list
to summarise.
e Excel training online
1 Select cell D64 and type =COUNTIF(C50:C61,C64). COUNTIF is structured
like this:

Which range do you


want to look at?

=COUNTIF(C50:C61,C64)

What value (text or number)


do you want to look for?
2 COUNTIFS is the same as SUMIF, but it lets you use multiple criteria. So in
this example, you can look for Fruit and Type, instead of just by Fruit. Select
cell H64 and type =COUNTIFS(F50:F61,F64,G50:G61,G64). COUNTIFS is
structured like this:

This is the first This is the second


range to count range to count

=COUNTIFS(F50:F61,F64,G50:G61,G64)

This is the criteria This is criteria for


for the first match the second match

Dive down for more detail Next

More conditional functions


More conditional functions
You’ve already seen SUMIF, SUMIFS, COUNTIF and COUNTIFS. Now you can try on
your own with the other functions, such as AVERAGEIF/S, MAXIFS, MINIFS. They’re
all structured the same way, so once you get one formula written, you can just
replace the function name with the one you want. We’ve written all the functions
you’ll need for cell E106, so you can copy/paste these, or try to type them yourself for
practice.

SUMIF =SUMIF(C92:C103,C106,E92:E103)
SUMIFS =SUMIFS(E92:E103,C92:C103,C106,D92:D103,D106)
AVERAGEIF =AVERAGEIF(C92:C103,C106,E92:E103)
AVERAGEIFS =AVERAGEIFS(E92:E103,C92:C103,C106,D92:D92,D106)
COUNTIF =COUNTIF(C92:C103,C106)
COUNTIFS =COUNTIFS(C92:C103,C106,D92:D103,D106)
MAXIFS =MAXIFS(E92:E103,C92:C103,C106,D92:D103,D106)
MINIFS =MINIFS(E92:E103,C92:C103,C106,D92:D103,D106)

Dive down for more detail


Next

SUMIF with a value argument


Here’s an example of the SUMIF function using greater than (>) to find all values
greater than a given amount:

Sum up some ....Look through ...and if the


values based these cells... value is
on this greater than
criterion: 50, sum it up.

=SUMIF(D118:D122,">50")

NOTE: If you find you are making a lot of conditional formulas, you might find that a
PivotTable is a better solution. See this PivotTable article for more information.

More information on the web


All about the SUMIF function All about the SUMIFS function
All about the SUMIF function All about the SUMIFS function

All about the COUNTIF function All about the COUNTIFS function

All about the AVERAGEIF function All about the AVERAGEIFS function

All about the MINIFS function All about the MAXIFS function

Create a drop-down list Free Excel training online

Back to top Next step


Fruit Amount Fruit Type Amount
Apples 50 Apples Fuji 50
Oranges 20 Oranges Florida 20
Bananas 60 Bananas Cavendish 60
Lemons 40 Lemons Rough 40
Apples 50 Apples Honeycrisp 50
Oranges 20 Oranges Navel 20
Bananas 60 Bananas Lady Finger 60
Lemons 40 Lemons Eureka 40
Apples 50 Apples Honeycrisp 50
Oranges 20 Oranges Navel 20
Bananas 60 Bananas Cavendish 60
Lemons 40 Lemons Eureka 40

Fruit SUMIF Fruit Type SUMIFS


Apples Oranges Florida

fferent from the other IF and IFS functions, in that they only have a criteria range and criteria. They don’t
EXPERT evaluate one range then look in
TIP
Each one of the Fruit and Type cells has
a drop-down list where you can select
different fruits. Try it, and watch the
formulas automatically update.

her functions, such as AVERAGEIF/S, MAXIFS, MINIFS. They’re all structured the same way, so once you get one formula written, you can j
er solution. See this PivotTable article for more information.

Fruit Amount Fruit Type Amount


Apples 50 Apples Fuji 50
Oranges 20 Oranges Florida 20
Bananas 60 Bananas Cavendish 60
Lemons 40 Lemons Rough 40
Apples 50 Apples Honeycrisp 50
Oranges 20 Oranges Navel 20
Bananas 60 Bananas Lady Finger 60
Lemons 40 Lemons Eureka 40
Apples 50 Apples Honeycrisp 50
Oranges 20 Oranges Navel 20
Bananas 60 Bananas Cavendish 60
Lemons 40 Lemons Eureka 40

Fruit COUNTIF Fruit Type COUNTIFS


Apples 3 Oranges Florida 1
Fruit Type Amount
Apples Fuji 50
Oranges Florida 20
Bananas Cavendish 60
Lemons Rough 40
Apples Honeycrisp 50
Oranges Navel 20
Bananas Lady Finger 60
Lemons Eureka 40
Apples Honeycrisp 50
Oranges Navel 20
Bananas Cavendish 60
Lemons Eureka 40

Fruit Type Try it


Lemons Eureka 80

Item Amount
Bread 50
Doughnuts 100
Cookies 40
Cakes 50
Pies 20
100
aluate one range then look in another to summarise.
Fruit and Type cells has
where you can select
ry it, and watch the
atically update.

one formula written, you can just replace the function name with the one you want. We’ve written all the functions you’ll need for cell E10
nctions you’ll need for cell E106, so you can copy/paste these, or try to type them yourself for practice.
GOOD TO KNOW
Double-click this cell and you’ll see that the formula
is different. Specifically, the sum criteria is ">=50"
which means greater than or equal to 50. There are
other operators you can use like "<=50" which is
less than or equal to 50. And there’s "<>50" which is
not equal to 50.
the
As you Search
enter for
aeach
function box,
section,
and press GO.
the criteria for
When you see
each argument
VLOOKUP
is listed at the
highlighted,
GOOD
bottomTO of the
click
form.OK
KNOW at the
Press OK
bottom.
As
when When
youyou’ve
enter
you
each selectand
finished, a
function
argument’s
Excel will in the
enter
Let
TAKE
list,
If
AT you
the
section,
the Let the Function Wizard guide you
A Function
LOOK
Excel
formula
THIS
display know
argument’s
for you. its
will
the the
Wizard guide you
name of the function you want, but you aren’t sure how to build it, you can use the Function Wizard to help y
You
syntax.should
description will
end up with
be displayed
=VLOOKUP(C1
towards the
0,C5:D8,2,FALSIf you know the name of the function you want, but you aren’t sure how to build it,
bottom ofyou the can use the Function Wizard to help you out.
E)
form, above
GOOD TO KNOW
the Formula
You
result. type1cell and range references, or select them with your mouse.
can

Previous
Next
More information on the web
Overview of formulas in Excel
2 (by category)
Excel functions
Excel functions (alphabetical)
Free Excel training online

Previous

More information on the web


Let the Function Wizard guide you
the Function Wizard guide you
ou know the name of the function you want, but you aren’t sure how to build it, you can use the Function Wizard to help you out.

If you know the name of the function you want, but you aren’t sure how to build it,
you can use the Function Wizard to help you out.
OD TO KNOW
can type1cell and range
Select references,
cell D10, thenorgo
select them with >
to Formulas your mouse.
Insert Function > type VLOOKUP
in the Search for a function box, and press GO. When you see VLOOKUP
highlighted, click OK at the bottom. When you select a function in the list,
Excel will display its syntax.
re information on the web
rview of formulas in Excel
2 (byNext,
el functions category)
enter the function arguments in their respective text boxes. As you
el functions (alphabetical)
enter each one, Excel will evaluate it, and show you its result, with the final
e Excel training result
online at the bottom. Press OK when you’ve finished, and Excel will enter
the formula for you.

GOOD TO KNOW
As you enter each argum
description will be displa
form, above the Formula

Previous Next

More information on the web


Overview of formulas in Excel

Excel functions (by category)

Excel functions (alphabetical)


Free Excel training online
ction Wizard to help you out.

Fruit Amount
Apples 50

Oranges 20
Bananas 60
Lemons 40

Apples 50

TAKE A LOOK AT THIS


You should end up with
=VLOOKUP(C10,C5:D8,2,FALSE)

GOOD TO KNOW
You can type cell and range references, or select them
with your mouse.

GOOD TO KNOW
As you enter each argument’s section, the argument’s
description will be displayed towards the bottom of the
form, above the Formula result.
Fixing
At some Fixing formula errors
formula errors
point in time, you’ll run across a formula that has an error, which Excel will display with #ErrorName. Errors can be he
GOOD TO
Error checking – Go to Formulas > Error Checking. This will load a dialogue that will tell you the general cause for your specific
KNOW
Clicking At some point in time, you’ll run across a formula that has an error, which Excel will
If you click Help on this Error, a help topic specific to the error message will open. If you click Show Calculation Steps, an Evalu
display
Options will let with #ErrorName. Errors can be helpful, because they point out when something’s
you set thenot
Each
rules time youworking
for when
correctly,
click Evaluate, but
Excel willthey
stepcan be challenging
through toone
the formula fix. Fortunately, thereItare
section at a time. several
won’t necessarily tell you why an err
options
errors in Excel that can help you track down the source of the error and fix it.
EXPERIMENT
are displayed
What’s wrong 1
or ignored. here? Hint: We’re trying to SUM up all the items.

Previous
Next
More information on the web
Detect errors in formulas
How to avoid broken formulas
Evaluate a nested formula one step at a time
Free Excel training online

3
Previous

More information on the web


ng
ome Fixing formula errors
formula errors
point in time, you’ll run across a formula that has an error, which Excel will display with #ErrorName. Errors can be helpful, because t

r checking – Go to Formulas > Error Checking. This will load a dialogue that will tell you the general cause for your specific error. In cell D9
At some point in time, you’ll run across a formula that has an error, which Excel will
ou click Help on this Error, a help topic specific to the error message will open. If you click Show Calculation Steps, an Evaluate Formula dia
display with #ErrorName. Errors can be helpful, because they point out when something’s
h timenot
youworking correctly,
click Evaluate, but
Excel willthey
stepcan be challenging
through the formula toone
fix. Fortunately, thereItare
section at a time. several
won’t necessarily tell you why an error has occurred,
options that can help you track down the source of the error and fix it.
ERIMENT
at’s wrong 1here? Error
Hint: We’re
checkingtrying
– Goto SUM up all the>items.
to Formulas Error Checking. This will load a dialogue
that will tell you the general cause for your specific error. In cell D9, the #N/A
error is caused because there is no value matching “Apple”. You can fix this
by using a value that does exist, suppress the error with IFERROR or ignore it
re information onandthe know
web it will go away when you do use a value that exists.
ect errors in formulas
w to avoid broken formulas
uate a nested formula one step at a time
e Excel training online

2 If you click Help on this Error, a help topic specific to the error message
will open. If you click Show Calculation Steps, an Evaluate Formula
dialogue will load.

3 Each time you click Evaluate, Excel will step through the formula one
section at a time. It won’t necessarily tell you why an error has occurred,
but it will point out where. From there, look at the help topic to deduce
what went wrong with your formula.
Each time you click Evaluate, Excel will step through the formula one
section at a time. It won’t necessarily tell you why an error has occurred,
but it will point out where. From there, look at the help topic to deduce
what went wrong with your formula.

Previous Next

More information on the web


Detect errors in formulas

How to avoid broken formulas

Evaluate a nested formula one step at a time

Free Excel training online


ame. Errors can be helpful, because they point out when something’s not working correctly, but they can be challenging to fix. Fortunatel

Fruit Amount

Apples 50

Oranges 20

Bananas 60
Lemons 40

Apple #N/A

GOOD TO KNOW
Clicking Options will let you set the
rules for when errors in Excel are
displayed or ignored.

Fruit Amount
Apples 50
Oranges 20
Bananas 60
Lemons 40

Total #NAME?
EXPERIMENT
What’s wrong here? Hint: We’re trying to
SUM up all the items.
e challenging to fix. Fortunately, there are several options that can help you track down the source of the error and fix it.
ror and fix it.
Have more questions about Excel?
Press ALT+Q and type what you want to know.
Keep going. There is more to learn with Excel:

Community: Ask questions and connect with other Excel fans.


What else is new?Office 365 subscribers get continual updates and new features.
Give us feedback on this tour
Have more questions about Excel?
Press ALT+Q and type what you want to know.
Have more questions about Excel?
Keep going. There is more to learn with Excel:

Community: Ask questions and connect with other Excel fans.


What else is new?Office 365 subscribers get continual updates and new features.
Give us feedback on this tour

Keep going. There is more to learn with Excel:

Community What else is new?


Ask questions and Office 365 subscribers
connect with other get continual updates
Excel fans. and new features.

Learn more Learn more


hat else is new?
ice 365 subscribers
continual updates
d new features.

arn more

You might also like