Excel Tutorial
Excel Tutorial
In just a few steps, you'll be up and running with building formulas and functions in Excel, the
world's most powerful spreadsheet app.
Let's go
>
Go back to top by pressing CTRL+HOME. To start the tour, press CTRL+PAGE DOWN.
=A1+B1,
constants
aren't a good
practice. Why?
Because you
can't easily see
the constant
without
selecting the
cell and
Basics:
looking
Formulas
That can
Basics: doing math with Excel
You candoingfor
Add,it. math
can
make
withMultiply,
Subtract, Excel and Divide in Excel without using any built-in functions. You just need to use some basic oper
To Add, cell
contain select cell F3, type =C3+C4, then press Enter.
it hard to
references,
change later.
ranges
To You
of cell cancell
Add, Subtract,
=C3-C4,Multiply, and Divide in Excel without using any
To Subtract,
It's much
Multiply, select
select
built-in cell F4, type
F5,
functions.
type =C3*C4,
You
then
then
just
press
press
need to
Enter.
Enter.
use some basic operators: +, -, *, /. All
references,
easier to put
To Divide,
operators,
your constants select
and cell F6, type =C3/C4, then
formulas start with an equals (=) sign.press Enter.
constants.
in cells, where The
following
Checkcan
they are
thisbeout: change the numbers in cells C3 and C4, and watch the formula results automatically change.
all examples of
easily
EXTRA
formulas: CREDIT:
adjusted, and
1 You can raise a value to a power by using the carat (^) symbol, like =A1^A2. Enter it with Shift+6. In cell F7, ent
Dive down for more detail
referenced in
=A1+B1
Next step
your formulas.
=10*20
More
Excel isabout
=SUM(A1:A10)
2up of individual
madeformulas, cells, and ranges
cells that are grouped into rows and columns. Rows are numbered, and columns are lettered. Th
For example:
Select the
You'll notice
yellow cell that in our third example above, we used the SUM function. A function is a pre-built command that takes a value
with
Formulasbelow.
12 with3 functions start with an equals sign, then the function name follows with its arguments (the values a function us
You'll see we
used the SUM
function with a
Some
range formula
of cells.4explanations
We
=10*20didn'tis atype
formula, where 10 and 20 are constants, and the * sign is the operator.
in "4" or "8"
=SUM(A1:A10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula argum
directly into
=SUM(A1:A10,C1:C10)
the formula. is a formula, where SUM is the function name, the opening and closing parentheses contain the formul
Dive down for more detail
Previous
Next
More information on the web
More about formulas, cells, and
Use Excel as a calculator
Overviewranges
of formulas
Excel in Excel
is made up of individual cells that are grouped into rows and
Excel functions (by category)
columns. Rows are numbered, and columns are lettered. There are over
1 million rows and 16,000 columns, and you can put formulas in any of
Excel functions
them. (alphabetical)
Free ExcelFormulas
training online
can contain cell references, ranges of cell references,
operators, and constants. The following are all examples of formulas:
=A1+B1
=10*20
=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 through 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 calculate, 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 finalize the formula and calculate the result.
Previous
ck this out: change the numbers in cells C3 and C4, and watch the formula results automatically change.
RA CREDIT:1 YouTocanAdd,
raise aselect cell
value to F3, type
a power =C3+C4,
by using the caratthen presslike
(^) symbol, Enter.
=A1^A2. Enter it with Shift+6. In cell F7, enter =C3^C4.
e down for more detail
re isabout
el 2up ofToindividual
madeformulas, Subtract,
cells, and select
ranges
cells that cell F4,into
are grouped type =C3-C4
rows , thenRows
and columns. press Enter. and columns are lettered. There are over 1 m
are numbered,
'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, calcu
mulas with3 functions
To Multiply, select cell F5, type =C3*C4, then press Enter.
start with an equals sign, then the function name follows with its arguments (the values a function uses to calculate)
me formula 4explanations
To Divide, select cell F6, type =C3/C4, then press Enter.
*20 is a formula, where 10 and 20 are constants, and the * sign is the operator.
M(A1:A10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula arguments, and A1:A1
M(A1:A10,C1:C10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula arguments, an
Dive down for more detail Next step
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 Function
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 through A10, and totals them. Excel has over
400 functions, which you can explore on the Formulas tab.
=SUM(A1
Formulas with functions start with an equals sign, then the function name A range of cells has a
ending cell. When you
follows with its arguments (the values a function uses to calculate)
formula, Excel will au
wrapped in parentheses.
Formulas with functions start with an equals sign, then the function name A range of cells has a
ending cell. When you
follows with its arguments (the values a function uses to calculate)
formula, Excel will au
wrapped in parentheses.
You confirm a formula by pressing Enter. Once you do that the formula
will calculate, 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 finalize the formula and calculate the result. Function
Previous Next
=SUM(A1
)
More information on the web Opening parent
the formula arguments, and A1:A10 is the cell range for the function.
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 f
While =10*20 might calculate the same as =A1
1 Cell
referenc
e
Cell
reference
Constant Constant
adjusted, and referenced in your formulas.
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.
=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.
UM function takes the cell references or ranges you specify, and totals them. In this example it takes the cells A1 through A10, and totals th
O KNOW
e values that you enter in cells or formulas.
0 might calculate the same as =A1+B1,
en't a good practice. Why? Because you can't
e constant without selecting the cell and looking
an make it hard to change later. It's much easier
constants in cells, where they can be easily
d referenced in your formulas.
Values
4
8
12
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".
Back to top
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:
=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".
=TODAY()
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
contain numbers.
Fruit Amount
Apples 50 CHECK THIS OUT
Select these cells. Then in the lower-right
Oranges 20 corner of the Excel window, look for this:
Bananas 60
Lemons 40
That's called the Status Bar, and it's just
SUM > 170 another way to quickly find a total and other
details about a selected cell or range.
Item Amount
Cars 20
Trucks 10
Bikes 10
Skates 40
IMPORTANT DETAIL
Double-click this cell. You'll notice the 100 toward 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
CHECK THIS
MEDIAN or
OUT
MODE here.
AVERAGE
Select AVERAGE function
functionany
range of gives
MEDIAN
Use
you the
numbers,
the AVERAGE function to get the average of numbers in a range of cells.
then
value
Select
look
in Use
cell D7,
theinmiddle
the thethen
AVERAGE functionto
use AutoSum toadd
get an
theAVERAGE
average offunction.
numbers in a range of
Status
of
Now Barcells.
the selectfor
data set,cell G7, and enter an AVERAGE function by typing =AVERAGE(G3:G6).
an instant
while
In cellgives
Average.
MODE D15,1 you can use either AutoSum, or type to enter another AVERAGE function.
the one that
occurs
Activate thethe previous sheet
most
Go 2sheet
to the next
frequently.
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.
Previous
1 Select cell D7, then use the AutoSum Wizard to add a MIN
function.
obut the MIN function
Now select cell G7, and enter a MAX function by typing
bout the 2MAX function
=MAX(D3:D6).
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
GOOD TO KNOW
You can use either MIN or MAX with multiple
N(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.
start
displayand a end
times,
negative then
subracts
number the
time
becausetheyyou took
for lunch.
haven't The
*24 at the
entered yourend
of the
birthday formula
yet,
In cell D28,
converts thean
you can
enter use
=NOW(),
fractional
IF function like
which
portion will
of give
the
this:
the
Date
day that Date functions
current
functions
=IF(D7="","",D
time,
Excel
and give
will you the current date, based on your computer's regional settings. You can also add and subtract Dates.
sees
Excel into
can
7-D6), which
update
hours. each
You'll
says,
time "IF
CheckExcel D7the TODAY function, which gives you Today's date. These are live, or volatile functions, so when you open your wor
need
equals toout
format
Excel can give you the current date, based on your computer's regional
calculates.
the cell asthen aIf - EnterYou
Subtract
nothing,
you need to Dates
settings. yourcan
nextalso
birthday
addinand
MM/DD/YY
subtract format in cell D7, and watch Excel tell you how many days away it is b
Dates.
Number
show nothing,
Add Dates
change the - Let's say you want to know what date a bill is due, or when you need to return a library book. You can add days to
though.
otherwise To do
Time format,
GOOD
that,
show
you
Excel
Home can
go
D7TOtoKNOW
go to
keeps
>
1
dates and times based on the number of days starting from January 1, 1900. Times are kept in fractional portions
minus
Ctrl+1 D6".
Format>> Cells
Number
(Ctrl+1) >>
Time
Time
Number >functions
Select
Excel
the can>give you the current time, based on your computer's regional settings. You can also add and subtract times. For insta
Number > 2you
format
want.
decimals. 2
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 3
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
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 subracts 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
GOOD TO KNOW
You can use keyboard s
Times that won't contin
The inner parentheses () make sure Excel calculates those D
parts of the formula by themselves. The outer Tim
parentheses make sure Excel multiplies the final inner result by
24.
Previous Next
Date functions
Today's date: 08/14/24 You got it!
Your birthday: 11/03/23
Days
ract times. For until your
instance, youbirthday: -285
might need to keep track of
IMPORTANT
how many hoursIfan employee
DETAILweek, and calculate their pay and ov
worked
you don't want Excel each
to display a negative number,
because you haven't entered your birthday yet, you
Grace period days: 5 can use an IF function like this: =IF(D7="","",D7-D6),
Bill due on: 08/19/24 which says, "IF D7 equals nothing, then show nothing,
otherwise show D7 minus D6".
he 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 O
GOOD TO KNOW
Excel keeps dates and times based on the number of days
starting from January 1, 1900. Times are kept in fractional
portions of a day based on minutes. So 01/01/2017 12:30
PM 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: 11:31:57 PM
GOOD TO KNOW
You can use keyboard shortcuts to enter Dates and
Times that won't continuously change:
Date - Ctrl+;
Time - Ctrl+Shift+:
calculate
ative their pay and overtime.
number,
day yet, you
"","",D7-D6),
show nothing,
e Out)-(Lunch In - Lunch Out))*24.
Joining
There are Joining text from different cells
text fromtimes
many different cellswhen you want to join text that's in different cells. This example is very common, where you ha
in Excel
In cell E3, enter =D3&C3 to join the last and first names.
SmithNancy doesn't look quite right though. We need to add a comma and a space. To do that we'll use quotes to create a ne
There are many times in Excel when you want to join text that's in different
To create cells.
the fullThis
name,example
we'll join first and last
is very name, but
common, use a space
where without
you have a comma.
first In F3,
and last enter =C3&" "&D3.
names,
and want to combine them as first name, last name, or full name.
Dive downFortunately,
for more detailExcel lets us do that with the Ampersand (&) sign, which you
Next can enter with Shift+7.
Using text and numbers together
Look
In cellatC36, 1
cellsenter
C28:D29. See"&TEXT(D28,"MM/DD/YYYY").
=C28&" how the date and times are inMM/DD/YYYY
separate cells?is You
the can join them
US format together
code with the & symbol
for Month/Day/Year, like yo
like 09/25/
=C28
WORTH " &2
& "EXPLORING
TEXT(D28,"MM/DD/YYYY")
If you don't know what format code to use, you can use Ctrl+1 > Number to format any cell the way you want. Then select the
More information on the web
All about the TEXT function
Combine text and numbers
3 online
Free Excel training
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 the Serial date in this case. We need to
explicity 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.
2
Previous
" &2
SmithNancy doesn't look quite right though. We need to add a
8RTH
& "EXPLORING
TEXT(D28,"MM/DD/YYYY")
comma and a space. To do that we'll use quotes to create a new
ou don't know what
textformat
string.code to time,
This use, you can use
enter Ctrl+1 > "&C3.
=D3&", NumberThe
to format any portion
&", "& cell the way you want. Then select the Custom option
re information on the web
lets us join a comma and space with the text in the cells.
about the TEXT function
mbine text and numbers
3 To
e Excel training create the full name, we'll join first and last name, but use a
online
space without a comma. In F3, enter =C3&" "&D3.
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 the Serial date in this case. We need to
explicity 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.
ant. Then select the Custom option. You can copy the format code that's displayed back to your formula.
WORTH EXPLORING
If you don't know what 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 know what 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.
formula
you start in cell
we've
D12. Weentered
got
typing, Excel's
=IF(E33="Yes",
you
Next started
we've
auto-correct,
F31*SalesTax,
with
added an IFit
should
0), where find we
=IF(C12<100,"L
statement
for you. When to
set
ess up
than
calculate
it
Copydoes,
SalesTax D9 to press
100","Greater
shipping
In
Tab cell D9
toTheenterifas
enter
a
it'sit.
D10.
Named
than
required. Range
oraequal In
=IF(C9="Apple
This
answer
with is here
a value of
to
cell 100").
EXPERTF35
",TRUE,FALSE).
Named TIP What
you'll
Range,
should
0.0825.
happens
Named
see beOur
if
Ranges you
The
and
FALSE,
IF
entered
because
cell
IF
IF statements
correct
we says If
statements
formula
enter
allow a isit to
you
=IF(E35="Yes",
answerE33terms
statements
number an allow you to make logical comparisons between conditions. An IF statement generally says that if one condition
equals
define
SUM(D28:D29)
TRUE.
from Formulas
orange
Yes,
greater
or then is
valuesthan
*1.25,0). nota
in
This
>multiply
an Define
apple. cell
100
single
says
Name. in cell
"Ifplace,
cell
Now, IF statements
if allow you to make logical comparisons between conditions.
F31
C12?
and
E35 times
then
is Yes,needreuse
you ever
SalesTax, An IF statement generally says that if one condition is true do something,
them
then
TRUE
to take
change the
andotherwise
FALSE
your are unlike other words in ExcelThe
formulas in thatcan
theyreturn
don't need to values,
be in quotes, and Excel will automatically c
otherwise
throughout
sum of the a do something else. formulas text, or even
=IF(C3="Apple","Yes","No")
shipping
return cost,
a 0.more
workbook.
Quantity Youmore calculations.
you
Diveonlydown have for detail
can
to see
column
do it all
in
in of
the
one
Try
Next
the
tablechanging
named
above,
place,
Yes to and
No inyou1itwith another function
ranges
and
IF
IF inthe
multiply
statement
statements this
can
cell
by
use
E33 to by
workbook
1.25, seecan also force additional calculations to be performed if a certain condition is met. Here we're going to evaluate
Shipping
the calculationname
going
otherwise
anywhere to in
change.
Formulas
return a 0". >
the workbook. 2
Name
Manager. Click
GOOD
here toTO learn KNOW
When
more. you create a formula, Excel will automatically place colored borders around any ranges referenced in the formula, and t
3
Previous
Next
More information on the web
All about the IF function
All about the IFS function
Dive down for more detail
Advanced IF statements
Free Excel training online
3
Previous
atement1
atementswith In cell function
can another
also
D9 enter =IF(C9="Apple",TRUE,FALSE). The correct
force is
additional
answer TRUE.calculations to be performed if a certain condition is met. Here we're going to evaluate a cell to see if S
Previous Next
Advanced IF statements
will automatically capitalize them. Numbers don't need to be in quotes either. Regular text, like Yes or No does need to be in quotes like t
IF statements
Apple
Orange
n the formula, and the corresponding ranges in the formula will be the same color. You can see this if you select cell F33 and press F2 to ed
IMPORTANT DETAIL
TRUE and FALSE are unlike other words in Excel formulas
in that they don't need to be in quotes, and Excel will
automatically capitalize them. Numbers don't need to be
in quotes either. Regular text, like Yes or No does need to
be in quotes like this:
=IF(C3="Apple","Yes","No")
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.
, or even more calculations.
O KNOW
eate a formula, Excel will automatically
d borders around any ranges referenced
a, and the corresponding ranges in the
be the same color. You can see this if
ll F33 and press F2 to edit the formula.
exists, but you
we'll wraptoour
still want
existing the
suppress
In cell D22,
VLOOKUP
#N/A
enter error,
formula
you can like an
use
=VLOOKUP(C2
this in cell
error handling
2,C17:D20,2,F
D43:
function called
ALSE). The
IFERROR
correct in cell
answer
=IF(C43="","",
G43:
for Apples is
VLOOKUP(C43,
=IFERROR(VLO
50.
VLOOKUP
looked VLOOKUP
VLOOKUP
C37:D41,2,FAL
VLOOKUP
OKUP(F43,F37:
SE)) tryfor
Now
G41,2,FALSE),"foris one of the most widely used functions in Excel (and one of our favorites too!). VLOOKUP lets you look up a value i
Apples,
yourself found
in the
").
it, IFERROR
then went
=VLOOKUP(A1,B:C,2,FALSE)
Meat
This
says section,
saystheifVLOOKUP
ifone cell
over is one
in
C43
Whatcell
VLOOKUP
column
G22.
equals
do toyouthe want to look for?of the most widely used functions in Excel (and one of our
You should
nothing
returns favorites too!). VLOOKUP lets you look up a value in a column on the left,
a(""),
valid
If you
right,
end up find
and
with it, how many columns to the right do you want to get a value?
then
result, return
then then returns information in another column to the right if it finds a match.
returned
Where doVLOOKUP
=VLOOKUP(F2
nothing, the
you want tosays:
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
etc.), or and #N/A
Invariably,
closes the as you'll
IF run into a situation where VLOOKUP can't find what you asked it to, and it returns an error (#N/A). Sometime
text, such
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 analyze worksheet data
2 online
Free Excel training
1
2
Previous
OOKUP(A1,B:C,2,FALSE)
VLOOKUP
at do you is one
want to look for?of the most widely used functions in Excel (and one of our
favorites too!). VLOOKUP lets you look up a value in a column on the left,
ou find it, how many columns to the right do you want to get a value?
then returns information in another column to the right if it finds a match.
ere doVLOOKUP
you want tosays:
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
OKUP and
ariably, =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
ORTANT 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 E
Where do Do you want
you want to an exact,
le of thumb is to not add error handlers to your formulas until you're or
absolutely certain they work properly.
look for it? approximate
match?
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))
This says, "If cell C43 equals nothing (""), then return nothing,
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're not 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
r (#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.
Apples Pork
EXPERIMENT
Try selecting different items from the drop down lists. You'll see
the result cells instantly update themselves with new values.
M 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
Donuts 100 Donuts 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.
=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:
200
Sum up through
....Look some values
thesebased
cells...on this criterion:
...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 informationDive
on thedown
web for more detail
Dive down for more detail
All about the SUMIF function
All about the SUMIFS function
All about the COUNTIF function
All about the COUNTIFS function
Conditional functions - COUNTIF
All about the AVERAGEIF function
All about the AVERAGEIFS function
All about the MINIFS function
COUNTIF and COUNTIFS let you count values in a range based on a
All about the MAXIFS
criteria you function
specify. They're a bit different from the other IF and IFS
Create a drop-down list
functions, in that they only have a criteria range, and criteria. They don't
Free Excelevalute
training online
one range, then look in another to summarize.
Back to top
Next
1
=COUNTIFS(F50:F61,F64,G50:G61,G64)
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)
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.
Previous
=SUMIF(C3:C14,C17,D3:D4)
e down for more detail
re conditional functions
=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17)
e down for more detail
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 informationDive
on thedown
web for more detail Next
Dive down for more detail Next
about the SUMIF function
about the SUMIFS function
about the COUNTIF function
about the COUNTIFS function
Conditional functions - COUNTIF
about the AVERAGEIF function
about the AVERAGEIFS function
about the MINIFS function
COUNTIF and COUNTIFS let you count values in a range based on a
about the MAXIFS
criteria you function
specify. They're a bit different from the other IF and IFS
ate a drop-down list
functions, in that they only have a criteria range, and criteria. They don't
e Excelevalute
training online
one range, then look in another to summarize.
=COUNTIF(C50:C61,C64)
=COUNTIFS(F50:F61,F64,G50:G61,G64)
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)
=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.
Back to top
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
nt from the other IF and IFS functions, in that they only have a criteria range, and criteria. They don't evalute
EXPERT TIP one range, then look in anot
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.
Item Amount
Bread 50
Donuts 100
Cookies 40
Cakes 50
Pies 20
200
ne range, then look in another to summarize.
ruit and Type cells has a
here you can select
y it, and watch the
tically update.
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
equals 50.
asection,
function thebox,
and
criteria forGO.
press
When you see
each argument
VLOOKUP
GOOD
is listedTO at the
highlighted,
KNOW
bottom of the
click
As
form.youOKPress
at the
enter OK
bottom.
each
when you're When
you select
and a
argument's
done,
function
section,
Excel will inenter
the the
CHECK
list, THIS
Excel will
the
Let
If
OUTyouthe
display Let the Function Wizard guide you
argument's
formula
know
description
you.
You
for name
Function
the
its will
should end
Wizard
ofguide you you want, but you're not sure how to build it, you can use the Function Wizard to help y
the function
syntax.
be
up displayed
with
toward the
=VLOOKUP(C10
bottom ofIfthe
,C5:D8,2,FALSE
you know the name of the function you want, but you're not sure how
form, above
)GOOD TO KNOW to build it, you can use the Function Wizard to help you out.
the Formula
You can type cell and range references, or select them with your mouse.
result.
1
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
If you know the name of the function you want, but you're not sure how
to build it, you can use the Function Wizard to help you out.
OD TO KNOW
can type cell and range references, or select them with your mouse.
1 Select cell D10, then go to Formulas > 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
e information on the web
display its syntax.
rview of formulas in Excel
2 (byNext,
l functions enter the function arguments in their respective text boxes.
category)
As you enter each one, Excel will evaluate it, and show you its
l functions (alphabetical)
Excel training result,
online with the final result at the bottom. Press OK when you're
done, and Excel will enter the formula for you.
GOOD TO KNO
You can type cell and
with your mouse.
GOOD TO KNOW
As you enter each argu
description will be disp
above the Formula resu
Previous Next
Fruit Amount
Apples 50
Oranges 20
Bananas 60
Lemons 40
Apples 50
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 toward the bottom of the form,
above the Formula result.
GOOD TO
KNOW
Fixing
At some
Clicking Fixing formula errors
formula
point inerrors
time, you'll run across a formula that has an error, which Excel will display with #ErrorName. Errors can be he
Error checking
Options will let- Go to Formulas > Error Checking. This will load a dialog that will tell you the general cause for your specific err
you setclick
If you theHelp on this Error, a help topic specific to the error message will open. If you click Show Calculation Steps, an Evalu
rules At
yousome
for when
Each time point inExcel
click Evaluate, time,
willyou'll run across
step through a formula
the formula that at
one section has an error,
a time. It won'twhich
necessarily tell you why an err
errors in Excel
Excel will display with #ErrorName. Errors can be helpful, because they
EXPERIMENT
are displayed
What's point
wrong outHint:
here? whenWe'resomething's
trying to SUMnot
upworking right, but they can be challenging
all the items.
or ignored. to fix. Fortunately, there are several options that can help you track down
the source of the error, and fix it.
Previous
Next
1
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
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 dialog 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
occurs, 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
occurs, but it will point out where. From there, look at the help
topic to deduce what went wrong with your formula.
Previous Next
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.
ging to fix. Fortunately, there are several options that can help you track down the source of the error, and fix it.
More questions about Excel?
Press ALT+Q and type what you want to know.
Keep going. There is more to learn with Excel:
LinkedIn Learning: Video courses for all levels—from beginner to advanced. Take at your own pace.
Community: Ask questions and connect with other Excel fans.
What else is new?Office 365 subscribers get continual updates and new features.
More questions about Excel?
Press ALT+Q and type what you want to know.
More questions about Excel?
Keep going. There is more to learn with Excel:
LinkedIn Learning: Video courses for all levels—from beginner to advanced. Take at your own pace.
Community: Ask questions and connect with other Excel fans.