You are on page 1of 87

Get started with formulas

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.
same as
=A1+B1,
constants
aren't a good
practice. Why?
Because you
can't easily see
the constant
without
selecting the
Basics:
You and
cell
looking
Basics: doing math with Excel
candoing
Add, math withMultiply,
Subtract, Excel and Divide in Excel without using any built-in functions. You just need to use some basic oper
To Add, for
Formulas canit. cell F3, type =C3+C4, then press Enter.
select
That can
contain cell make
it hard to You can Add, Subtract, Multiply, and Divide in Excel without using any built-in
references,
To
To Subtract,
change
ranges later.
of
Multiply, select cell
cellselect cell F5,
F4, type
type =C3*C4,
=C3-C4, then
then press
press Enter.
Enter.
It's much
references, functions. You just need to use some basic operators: +, -, *, /. All formulas start
To Divide,
easier to put selectancell
with F6, type
equals (=) =C3/C4,
sign. then press Enter.
operators, and
your constants
constants. The
in cells,this
Check
following whereout: change the numbers in cells C3 and C4, and watch the formula results automatically change.
are
they
all can
examples be of 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
EXTRA
easily
formulas:
CREDIT: 1
Dive downand
adjusted, for more detail
referenced
Next step in
=A1+B1
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
yellownotice
cell that in our third example above, we used the SUM function. A function is a pre-built command that takes a value
Formulas
with 12 below. with 3 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. 4 explanations
=10*20
We didn'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 ranges
Use Excel as a calculator
Overview of formulas in Excel
Excel is made up of individual cells that are grouped into rows and columns. Rows
Excel functions (by category)
are numbered, and columns are lettered. There are over 1 million rows and 16,000
columns,
Excel functions and you can put formulas in any of 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.
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.

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

More information on the web


cs:
Basics: doing math with Excel
candoing
Add, math withMultiply,
Subtract, Excel 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
ubtract, can cell
select Add,F4,Subtract, Multiply,
type =C3*C4,
=C3-C4, then and Divide in Excel without using any built-in
Multiply, select cell F5, type then press
press Enter.
Enter.
functions. You just need to use some basic operators: +, -, *, /. All formulas start
Divide,with
selectancell F6, type
equals (=) =C3/C4,
sign. then press Enter.
ck this out: change the numbers in cells C3 and C4, and watch the formula results automatically change.
RA CREDIT:1 YouTo canAdd,
raiseselect
a valuecell
to F3,
a power
type by using the
=C3+C4, carat
then (^) symbol,
press Enter. like =A1^A2. Enter it with Shift+6. In cell F7, enter =C3^C4.
e down for more detail

re isabout
el 2up ofTo
madeformulas, Subtract,
cells, and
individual select
ranges
cells cellgrouped
that are F4, typeinto rows ,and
=C3-C4 then press Rows
columns. Enter.
are numbered, and columns are lettered. There are over 1 m

'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 4 explanations
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

re information on the web


More about formulas, cells, and ranges
Excel as a calculator
rview of formulas in Excel
Excel is made up of individual cells that are grouped into rows and columns. Rows
el functions (by category)
are numbered, and columns are lettered. There are over 1 million rows and 16,000
columns,
el functions and you can put formulas in any of them.
(alphabetical) 
e ExcelFormulas
training online
can contain cell references, ranges of cell references, operators, and
constants. The following are all examples of formulas: =A1+B1
=A1+B1 Cell reference
=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, Function
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 =SUM(A1
tab.
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.
A range of cells has a sta
Formulas with functions start with an equals sign, then the function name follows cell. When you select a
with its arguments (the values a function uses to calculate) wrapped in parentheses. Excel will autom

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
Function
result.

Previous Next
=SUM(A1

More information on the web Opening parent

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:
5 Addition (+) 12 12
7 Subtraction (-) -2 -2
Multiplication (*) 35 35
Division (/) 0.7142857142857 0.71428571429
Power (^) 78125 78125
ft+6. In cell F7, enter =C3^C4.
CHECK THIS OUT EXTRA CREDIT
Change the numbers here, and You can raise a value to a
watch the formula results power by using the carat (^)
automatically change. symbol, like =C3^C4. Enter
mns are lettered. There are over 1 million rows and 16,000 columns, and you can put formulas in any of them.
it with Shift+6.

d that takes a value or values, calculates them in a certain way, and returns a result. For instance, the SUM function takes the cell reference
alues a function uses to calculate) wrapped in parentheses.

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

=A1+B1 =10*20 constants aren't a good practice. Why? Becaus


easily see the constant without selecting the ce
for it. That can make it hard to change later. It's
to put your constants in cells, where they can b
adjusted, and referenced in your formulas.
Cell
Cell reference Constant Constant
reference For example: Select the yellow cell with 12 bel
we used the SUM function with a range of cell
type in "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.
 

Commas separate multiple arguments

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.
M 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

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.

: Select the yellow cell with 12 below. You'll see


SUM function with a range of cells. We didn't
r "8" directly into the formula.

Values
4
8
12

ally add this for


ter.
rough A10, and totals them. Excel has over 400 functions, which you can explore on the Formulas tab.
Double-click
or type =SUM(,
this
thencell. You'll
select
notice
that rangethe 100
toward
with thethe
end.
mouse, Although
and
it's
presspossible
Enter. to
put
Thisnumbers
will sum
in
thea values
formula in
like
cellsthis,
D3, weD4,
don't
D5,
Introduction to functions
and D6. to functions
Introduction
recommend
Your answer it
Functions
unless
should it'sbe give
170. you the ability to do a variety of things, like perform mathematical operations, look up values, or even
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
This give you browse
the ability to do the
a variety of things, like perform mathematical
Go to theasFormulas
is known a tab and through Function Library, where functions are listed by category, like Text, Da
Here's a neat
constant, operations,
andkeyboardlook up values,
shortcut. Selector
celleven
D15,calculate
then pressdates
Alt =,and
thentimes.
Enter.Let's try a few waysenters
This automatically to SUM for you.
it's
Dive
When easy
downto add
you for up values
more
start detail
typing with the SUM function.
a function name after you press =, Excel will launch Intellisense, which will list all of the functio
EXTRA CREDIT
forget that it's
Try theWe
there. COUNT 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 let's
instead, SUM look
like at the
function anatomy
could of a few
talk, it would say,functions.
return theThe
sumSUM
of allfunction is in
the values structured
cells D38 like this:and all of column H. SUM is th
to D41,
cell F51. That2
way
The it's easily
TODAY function returns today's date. It will automatically update when Excel recalculates.
CHECK
seen and THISnotOUT
Select
hiddentheseinsidecells.
a Then in the lower-right corner of the Excel window, look for SUM: 170 in the bottom bar. That's called the S
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 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 even
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 auto
to theFunctions
Formulasgive you browse
tab and the ability to do the
through a variety of things,
Function like
Library, perform
where mathematical
functions are listed by category, like Text, Date & Time, etc
operations,
e's a neat keyboardlook up values,
shortcut. Selector
celleven
D15,calculate
then pressdates
Alt =,and
thentimes.
Enter.Let's try a few waysenters
This automatically to SUM for you.
een
RAdown 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 wit
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
1 Under the Amount column for Fruit (cell D7), enter =SUM(D3:D6), or type
re about functions=SUM(, then select that range with the mouse, and press Enter. This will sum
we let's
SUMlook at the
function the values
anatomy
could
in cells D3, functions.
of a few
talk, it would
D4, D5, and D6.SUM
say, return theThe
Your answer is
sum of allfunction
should be 170. this:
structured
the values in cells D38 like
to D41, and all of column H. SUM is the function name
2 Now let's try AutoSum. Select the yellow cell under the column for Meat
TODAY function returns today's date. It will automatically update when
CK THIS OUT (cell G7), then go to Formulas > AutoSum > select SUM. You'll see Excel Excel recalculates.
ct these cells. Then in the lower-right
automatically enter thecorner of the
formula forExcel
you.window, look for
Press Enter SUM: 170it.inThe
to confirm the bottom bar. That's called the Status Bar, and it
AutoSum feature has all of the most common functions.
re information on the web
about the3SUM function
Here's a neat keyboard shortcut. Select cell D15, then press A lthen,
t =
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 always separated by
required. commas (,).
The function The first Additional
name. argument. It's arguments,
almost always separated by
required. commas (,).

=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 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 > 140

Item Amount Item Amount


Bread 50 Bread 50
Donuts 100 Donuts 100
Cookies 40 Cookies 40
Cakes 50 Cakes 50
Pies 20 Pies 20
SUM > 260 COUNT > 5

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.

YOU'RE NOT DONE YET! KEEP


GOING!
Dive down for the additional activity

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

Total: Additional Value New Total


180 100 180

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. c

COMPLETE THE GRADE


CALCULATOR
Grading Criteria
Quizzes Projects Exams
Item 1 20 45 48
Item 2 15 43 33
Item 3 27
Item 4 10
Item 5 20

Grade
The cell under Grade should be the sum of all three --> 86.9
grading criteria multiplied by its percentage Written work Performance Tasks
25% 45%
92 88

Cell under Performance Tasks


Written work will be the sum of all
must contain the Projects
the total sum of
all the Quizzes
n using any of
eady tried.
ounts the
nge that

ht corner of the

another way to
out a selected cell
ade
.9
Exam
30%
81

Exam should
contain the
total of all
exams
EXTRA CREDIT
Try using
CHECK THIS
MEDIAN or
OUT
MODE
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 Use
cell the AVERAGE function
the D7, then use AutoSum
theinmiddle to to
addget
anthe average function.
AVERAGE of numbers in a range of cells.
Status
of
Now Bar
theselect for
data set,
cell G7, and enter an AVERAGE function by typing =AVERAGE(G3:G6).
an instant
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
the AVERAGE function to get the average of numbers in a range of cells.
ect cellUse
D7,the AVERAGE
then function
use AutoSum to to
addget
anthe average function.
AVERAGE of numbers in a range of cells.
w select cell G7, and enter an AVERAGE function by typing =AVERAGE(G3:G6).
ell D15,1 Select
you can use cell D7,AutoSum,
either then use AutoSum
or type toto addanother
enter an AVERAGE
AVERAGE function.
function.

vate the previous sheet


2sheetNow select cell G7, and enter an AVERAGE function by typing
o the next
=AVERAGE(G3:G6).
s for more information on the web
3all about
ct to learn In cell D15, youfunction
the AVERAGE can useoneither AutoSum, or type to enter another
the web
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 CHECK THIS OUT
Select any range of numbers,
Oranges 20 Chicken 30 then look in the Status Bar for an
Bananas 60 Pork 10 instant Average.
Lemons 40 Fish 50
AVERAGE > 42.5 AVERAGE > 35

Item Amount Item Amount


Bread 50 Bread 50
Donuts 100 Donuts 100
Cookies 40 Cookies 40
Cakes 50 Cakes 50
Pies 20 Pies 20
AVERAGE > 52 50

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 through 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 through 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 top by pressing CTRL+HOME. To proceed to the next step, press CTRL+PAGE DOWN.
UT
numbers,
tus Bar for an
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 celland orMAX
D15, lesser
youfunctions
then
Now
of use
those
selectthecell
values,
can
Use use
the either
AutoSum
like MIN function to get the minumum number in a range of cells.
G7,
the
Wizardandtoenter
AutoSum add aa
=MIN(A1:A10,B1
Use
MAX the Use
function
MAX the MIN
function
by function
to get to getnumber
the maximum the smallest number
in a range of cells. in a range of cells.
Wizard,
MIN or type
function.
:B10),
typing or Use the MAX function to get the largest number in a range of cells.
to enter a MIN
=MAX(A1:A10,B
=MAX(D3:D6).
or
More
1), MAX
where B1
function.
contains a on
information
threshold
the web value, 1
like 10, in which
case the
All aobutwould
formula the MIN function
never
All about the a2
return 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
and MAX functions
the MIN function to get the minumum number in a range of cells.
Use
the MAX the MIN
function 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.

obut the MIN function


Now select cell G7, and enter a MAX function by typing =MAX(D3:D6).
bout the 2MAX function
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

e information on the web


All about the MIN function
bout the MIN function
bout the MAX function
All about the MAX function
Excel as your calculator
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 Pastry Price Rank
MIN > 20 MAX > 50 Bread ₱ 50.00 3
Donuts ₱ 100.00 1
Item Amount Item Amount Cookies ₱ 40.00 4
Bread 50 Bread 50 Cakes ₱ 60.00 2
Donuts 100 Donuts 100 Pies ₱ 20.00 5
Cookies 40 Cookies 40
Cakes 50 Cakes 50
RANK Function
Pies 20 Pies 20 =RANK(J7,J7:J11), where J7 contains
MIN or MAX > 20 100 the value you want to compare, to a
set of value/list J7:J11.

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.
ction
J11), where J7 contains
u want to compare, to a
ist J7:J11.
start
displayand a end
times,
negative then
subracts
number the
time
becausetheyyoutook
for lunch.
haven't The
*24 at the
entered end
your
of the
birthday formula
yet,
In cell D28,
converts thean
you
entercan use
=NOW(),
fractional
IF function like
which
portion will
of give
the
this:
Date
the
day Date functions
functions
current
that Excel
=IF(D7="","",D
time, and give
Excelinto
can will you the current date, based on your computer's regional settings. You can also add and subtract Dates.
sees
7-D6), which
update
hours. each
You'll
says,
time
Check "IF
Excel
out D7the TODAY function, which gives you Today's date. These are live, or volatile functions, so when you open your wor
need
equals to format
Excel can give you the current date, based on your computer's regional settings. You
calculates.
the cell
Subtract as aIf also
Dates - Enter
nothing,
you need then
can
to addyour
andnext birthday
subtract in MM/DD/YY format in cell D7, and watch Excel tell you how many days away it is b
Dates.
Number
show nothing,
Add Dates - 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
change
though. the
To do
otherwise
Time format,
GOOD
that,
show go
D7TOtoKNOW 1
you
Excel
Home can go to
keeps
> 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

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.
ck out Excel
the TODAY function,
can give which
you the givesdate,
current you Today's
based date. These
on your are live, orregional
computer's volatile functions, so when you open your workbook tomorrow
settings. You
tract Dates - Enter
can also addyour
andnext birthday
subtract in MM/DD/YY format in cell D7, and watch Excel tell you how many days away it is by using =D7-D6
Dates.
Dates - 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 a date to find o
OD TO KNOW1 Check out the TODAY function, which gives you Today's date. These are live, or
el 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 o
volatile functions, so when you open your workbook tomorrow, it will have
tomorrow's date. Enter =TODAY() in cell D6.
el can give you the current time, based on your computer's regional settings. You can also add and subtract times. For instance, you might

2 Subtract Dates - Enter your next birthday in MM/DD/YY format in cell D7, and
watch Excel tell you how many days away it is by using =D7-D6 in cell D8.

is 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 multip
3 Add Dates - 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 a date to find out. In cell
D10,
re information on theenter
web a random number of days. In cell D11, we added =D6+D10 to
about the TODAY calculate
functionthe due date from today.
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
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.
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
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

More information on the web


All about the TODAY function

All about the NOW function

All about the DATE function

Free Excel training online


you open your workbook tomorrow, it will have tomorrow's date. Enter =TODAY() in cell D6.
ny days away it is by using =D7-D6 in cell D8.

Date functions
Today's date: 06/27/23 You got it!
Your birthday: 06/19/23
Days
ract times. For until your
instance, youbirthday: -8 many hours IMPORTANT
might need to keep track of how
DETAIL
Ifanyou
employee worked
don't want Exceleach week,aand
to display calculate
negative their pay and ov
number,
because you haven't entered your birthday yet, you can
Grace period days: 6/27/2023 use an IF function like this: =IF(D7="","",D7-D6), which
Bill due on: 12/23/46 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: 2:22:19 AM

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.00
Static Date & Time
Date: 11/13/22
Time: 12:08 PM

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

Date - Ctrl+;
Time - Ctrl+Shift+:
eek,
lay aand calculate
negative their pay and overtime.
number,
your birthday yet, you can
(D7="","",D7-D6), which
en show nothing,
.
In - Time 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 cells. This
To create the full name, we'll join first and last name, but use a space without a comma. In F3, enter =C3&" "&D3.
example is very common, where you have first and last names, and want to combine
Dive downthem as first
for more name, last name, or full name. Fortunately, Excel lets us do that with the
detail
Next Ampersand (&) sign, which you can enter with Shift+7.
Using text and numbers together
Look
In cellatC36, 1C28:D29.
cellsenter 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

Dive down for more detail

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 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

More information on the web


ingare
re 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 have first and last
in Excel
ell E3, enter =D3&C3 to join the last and first names.
thNancy 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 new text string. Th
There are many times in Excel when you want to join text that's in different cells. This
reate the full name, we'll join first and last name, but use a space without a comma. In F3, enter =C3&" "&D3.
example is very common, where you have first and last names, and want to combine
e downthem as first
for more name, last name, or full name. Fortunately, Excel lets us do that with the
detail
Ampersand (&) sign, which you can enter with Shift+7.
ng text and numbers together
k atC36,
ell 1C28:D29.
cellsenter In cell
=C28&" E3, enter =D3&C3 to join
See"&TEXT(D28,"MM/DD/YYYY").
how the date and times arethe last andcells?
inMM/DD/YYYY
separate firstisnames.
You
the can join them
US format together
code with the & symbol
for Month/Day/Year, like you'll see in cells C
like 09/25/2017.

" &2
SmithNancy doesn't look quite right though. We need to add a comma and
8 & "EXPLORING
RTH TEXT(D28,"MM/DD/YYYY")
a space. To do that we'll use quotes to create a new text string. This time,
ou 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
enter =D3&", "&C3. The &", "& portion lets us join a comma and space
re information on the web
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 space
online
without a comma. In F3, enter =C3&" "&D3.

Dive down for more detail Next

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 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.

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


is the US format code for Month/Day/Year, like 09/25/2017.

2 In cell C37, enter =C29&" "&TEXT(D29,"HH:MM AM/PM"). HH:MM


AM/PM is the US format code for Hours:Minutes AM or PM, like 1:30 PM.
WORTH EXPLOR
If you don't know wha
Ctrl+1 > Number to fo
Then select the Custom
code that's displayed b
In cell C37, enter =C29&" "&TEXT(D29,"HH:MM AM/PM"). HH:MM
AM/PM is the US format code for Hours:Minutes AM or PM, like 1:30 PM.
WORTH EXPLOR
If you don't know wha
Ctrl+1 > Number to fo
Then select the Custom
Previous Next code that's displayed b

More information on the web


All about the TEXT function

Combine text and numbers

Free Excel training online


First Name Last Name Last Name, First Name Full Name
Nancy Smith Smith, Nancy Nancy Smith
Andy North North, Andy Andy North
Jan Kotas Kotas, Jan Jan Kotas
Mariya Jones Jones, Mariya Mariya Jones
Steven Thorpe Thorpe, Steven Steven Thorpe
Michael Neipper Neipper, Michael Michael Neipper
Robert Zare Zare, Robert Robert Zare
Yvonne McKay McKay, Yvonne Yvonne McKay

ant. Then select the Custom option. You can copy the format code that's displayed back to your formula.

Using text & numbers


Today's date: 06/27/23
Current time: 2:22 AM

Joining text & numbers


Today's date: 45104
Current time: 45104.098833971

CHECK THIS OUT


Formatting text & numbers Formulas, especially big ones, can
Today's date: 06/27/2023 sometimes be hard to read, but you can
Current time: 02:22 AM break up their parts with spaces like this:

=C28 & " " & TEXT(D28,"MM/DD/YYYY")

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.
exists, but you
In
stillthis
want case,to
we'll
suppress wrap theour
In cell
existing D22,
#N/A
enter error,
VLOOKUP
you can use an
=VLOOKUP(C2
formula like
error handling
2,C17:D20,2,F
this
functionin cell D43:
called
ALSE). The
IFERROR
correct in
answer cell
=IF(C43="","",
G43:
for Apples is
VLOOKUP(C43,
=IFERROR(VLO
50. VLOOKUP
looked VLOOKUP
C37:D41,2,FAL
VLOOKUP
OKUP(F43,F37:
VLOOKUP
SE)) tryfor
Now
G41,2,FALSE),"
Apples,
foris one of the most widely used functions in Excel (and one of our favorites too!). VLOOKUP lets you look up a value i
found
yourself
"). IFERROR in the
it,
Meat
Thisthen went
=VLOOKUP(A1,B:C,2,FALSE)
section,
says
says
over theif cell
ifone
in
C43
Whatcell G22.
equals
do VLOOKUP
you is one of the most widely used functions in Excel (and one of our favorites
VLOOKUP
column
You
nothing should to
(""),thewant to look for?
returns
If you
right, too!).
a valid
find
and VLOOKUP
it, how many columnslets you look
to the updo
right a value in ato
you want column on the left, then returns
get a value?
end
then
result, up with
return
then
returned
Where dothe
=VLOOKUP(F2
nothing, information in another
you want to look for it? column to the right if it finds a match. VLOOKUP says:
display
amount. that,
2,F17:G20,2,FA
otherwise
Do you want an exact, or approximate match?
otherwise,
LSE).
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
numbersend of(0,1, the
formula.
VLOOKUP
2, etc.), or andThis #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

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
OKUP is one 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 t

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 favorites
for?
ou find it, how many columnsyou
too!). VLOOKUP lets look
to the updo
right a value in ato
you want column on the left, then returns
get a value?
ere doinformation in another
you want to look for it? column to the right if it finds a match. VLOOKUP says:
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 th

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?

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 analyze 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'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

More information on the web


All about the VLOOKUP function

All about the INDEX/MATCH functions

All about the IFERROR function

Use PivotTables to analyze worksheet data

Free Excel training online


ou 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:

s with new values.

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.

Fruit Amount Meat Amount


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

Apples 50 Pork 10

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

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
Donuts 100 Cookies 40

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.

Name Math Physics Chemistry Biology


Aaron 38 58 66 49
Alexander 88 92 74 90
George 57 77 91 91
Eliza 44 69 65 50
Angelica 36 57 85 56

Chemistry
Aaron 66

Try to CHANGE the value in F66 and G65 and WATCH the
value change based on your choices
match. VLOOKUP says:

oesn't have a value yet.


written, you
can just
replace the
function name
with the one
you want.
We've written
all the
functions you'll
need for cell
Conditional functions - SUMIF
Conditional
E106, so youfunctions - SUMIF
can
Conditional functions let you sum, average, count or get the min or max of a range based on a given condition, or criteri
copy/paste
SUMIF
these, or lets
try you
to sum in one range based on a specifc criteria you look for in another range, like how many Apples you h
Conditional functions let you sum, average, count or get the min or max of a range
=SUMIF(C3:C14,C17,D3:D4)
type them
yourself based on a given condition, or criteria you specify. Such as, out of all the fruits in the
for
What range do you want to look at?
practice. 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 one of
eachismatch found, what range
SUMIF
SUMIFS
the Fruit the same
and as SUMIF, but itdolets
youyou
want
usetomultiple
sum in?criteria. So in this example, you can look for Fruit and Type, instead o
=SUMIF(C92:C
Type cells has
1
103,C106,E92:
a=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17)
drop-down
E103)
list
What where
COUNTIFS
SUMIFS range you
isdo you want to sum?
can
the select
same
=SUMIFS(E92:
This is as
This is the
different thefruits.
first range to look in for matches
SUMIF, but it
E103,C92:C103
second range
This
Try
lets is
it, the
and
youinuse
,C106,D92:D10
to look criteria for the first match
for
watch
multiple
3,D106)
matches the
formulas
criteria.
AVERAGEIF So in
This is the criteria for the second match
automatically
this example,
=AVERAGEIF(C
update.
you can look
92:C103,C106,
for
DiveFruit
E92:E103)
down and for more detail
Type, instead
AVERAGEIFS
Next
of juststep
by Fruit.
=AVERAGEIFS(
Conditional
Select cell H64
E92:E103,C92: functions - COUNTIF
and type
C103,C106,D9
COUNTIF and COUNTIFS let you count values in a range based on a criteria you specify. They're a bit different from the other I
=COUNTIFS(F5
2:D92,D106)
Select cell D64 and type =COUNTIF(C50:C61,C64). COUNTIF is structured like this:
0:F61,F64,G50:
COUNTIF
=COUNTIF(C50:C61,C64)
G61,G64).
=COUNTIF(C92
COUNTIFS
What rangeisdo you want to look at?
:C103,C106)
structured like
value 2
COUNTIFS
What
this:
=COUNTIFS(C9 (text or number) do you want to look for?
2:C103,C106,D
92:D103,D106)
=COUNTIFS(F50:F61,F64,G50:G61,G64)
MAXIFS
This is the first range to count
=MAXIFS(E92:E
This is the criteria for the first match
103,C92:C103,
C106,D92:D10
This is the second range to count
3,D106)
This is criteria for the second match
MINIFS
Dive down for more detail
=MINIFS(E92:E
103,C92:C103,
Next
C106,D92:D10
More
3,D106)conditional functions

=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
Dive down for more detail
More information on thedown
Dive web 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 criteria you
All about the MAXIFS function
specify. They're a bit different from the other IF and IFS functions, in that they only
Create a drop-down list
have a criteria range, and criteria. They don't evalute one range, then look in another
Free Excel training online
to summarize.
Back to top
Next
1

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

Dive down for more detail


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.

Previous

More information on the web


Previous

More information on the web


Conditional functions - SUMIF
ditional functions - SUMIF
ditional functions let you sum, average, count or get the min or max of a range based on a given condition, or criteri
MIF lets you sum in one range based on a specifc criteria you look for in another range, like how many Apples you h
Conditional functions let you sum, average, count or get the min or max of a range
MIF(C3:C14,C17,D3:D4)
based on a given condition, or criteria you specify. Such as, out of all the fruits in the
at 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 what range
as SUMIF, but itdolets
youyou
want
usetomultiple
sum in?criteria. So in this example, you can look for Fruit and Type, instead of just by Fruit. S
1 SUMIF lets you sum in one range based on a specifc criteria you look for in
another range, like how many Apples you have. Select cell D17 and type
MIFS(H3:H14,F3:F14,F17,G3:G14,G17)
at range do you=SUMIF(C3:C14,C17,D3:D14).
want to sum? SUMIF is structured like this:
is the first range to look in for matches
is the criteria for the first matchWhat range do you For each match found, what
want to look at? range do you want to sum?

is the criteria for the second match

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

ditional functions - COUNTIF


UNTIF and COUNTIFS let you count values in a range
What based
value (texton or anumber)
criteria you specify. They're a bit different from the other IF and IFS functio
ct cell D64 and type =COUNTIF(C50:C61,C64). COUNTIF
do you want tois look
structured
for? like this:
UNTIF(C50:C61,C64)
at 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
UNTIFS(F50:F61,F64,G50:G61,G64)
structured
is the first range to countlike this:
is the criteria for the firstWhat
match
range This is the This is the
is the second range to countdo you want criteria for criteria for
is criteria for the secondtomatch
sum? the first the second
match match
e down for more detail

re conditional functions

=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17)
e down for more detail

MIF with a value argument


This is the
e's an example of the SUMIF function using greater Thisgreater
than (>) to find all values is the than a given amount:
first range to second range
look in for to look in for
mook
up through
some values
thesebased
cells...on this criterion: matches matches
nd if the value is greater than 50, sum it up.

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
Dive down for more detail Next
re information on thedown
Dive web 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 criteria you
about the MAXIFS function
specify. They're a bit different from the other IF and IFS functions, in that they only
ate a drop-down list
have a criteria range, and criteria. They don't evalute one range, then look in another
e Excel training online
to summarize.

1 Select cell D64 and type =COUNTIF(C50:C61,C64). COUNTIF is structured


like this:
What 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
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.

Previous Next step

More information on the web


Previous Next step

More information on the web


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
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 150 Oranges Florida 20

nt from the other IF and IFS functions, in that they only have a criteria range, and criteria. TheyEXPERT
don't evalute
TIPone 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.

olution. 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
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
is listedTO
GOOD at the
highlighted,
bottom of the
KNOW
click
form.
As youOKPress
at the
enter OK
bottom.
when you're
each When
you
done, select a
and Excel
argument's
function
section, thethe
will enter inthe
list, Excel will Wizard guide you
Let
CHECK the
formula
argument's
If you
display
you. Let the Function Wizard guide you
description
OUT
syntax.
Function
for
know
THIS
its the name of the function you want, but you're not sure how to build it, you can use the Function Wizard to help y
will
be
Youdisplayed
should end
toward
up with the
bottom
=VLOOKUP(C10ofIfthe
you know the name of the function you want, but you're not sure how to build it,
form, above
GOOD TOyou
,C5:D8,2,FALSE)
the Formula KNOW can use the Function Wizard to help you out.
You
result.can type cell and range references, or select them with your mouse.
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

More information on the web


Let the Function Wizard guide you
uheknow
Function Wizard
the name ofguide you you want, but you're not sure how to build it, you can use the Function Wizard to help you out.
the function

If you know the name of the function you want, but you're not sure how to build it,
OD TOyou
KNOWcan use the Function Wizard to help you out.
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
e information on the webin the list, Excel will display its syntax.
rview of formulas in Excel
2 (byNext,
l functions enter the function arguments in their respective text boxes. As you
category)
enter each one, Excel will evaluate it, and show you its result, with the final
l functions (alphabetical)
Excel training result
online at the bottom. Press OK when you're done, and Excel will enter the
formula for you.

GOOD TO KNOW
As you enter each argu
description will be disp
above the Formula res

Previous Next

More information on the web


Overview of formulas in Excel

Excel functions (by category)


Excel functions (alphabetical)

Free Excel training online


n Wizard to help you out.

Fruit Amount
Apples 50
Oranges 20
Bananas 60
Lemons 40

Apples 50

CHECK THIS OUT


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 toward the bottom of the form,
above the Formula result.
GOOD TO
Fixing
KNOW
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
If you
you setclick
theHelp on this Error, a help topic specific to the error message will open. If you click Show Calculation Steps, an Evalu
rules At some point in time, you'll run across a formula that has an error, which Excel will
for when
Each time you click Evaluate, Excel will step through the formula one section at a time. It won't necessarily tell you why an err
errors in Excel
display with #ErrorName. Errors can be helpful, because they point out when
EXPERIMENT
are displayed
What's something's
wrong here? Hint:notWe're
working
tryingright, butup
to SUM they canitems.
all the be challenging to fix. Fortunately, there
or ignored.
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
3

Previous

More information on the web


ome Fixing formula errors
g 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 th
r checking - Go to Formulas > Error Checking. This will load a dialog that will tell you the general cause for your specific error. In cell D9, th
u click Help on this Error, a help topic specific to the error message will open. If you click Show Calculation Steps, an Evaluate Formula dial
At some point in time, you'll run across a formula that has an error, which Excel will
h 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
display with #ErrorName. Errors can be helpful, because they point out when
ERIMENT
something's
t's wrong notWe're
here? Hint: working
tryingright, butup
to SUM they canitems.
all the be challenging to fix. Fortunately, there
are several options that can help you track down the source of the error, and fix it.

1 Error checking - Go to Formulas > Error Checking. This will load a dialog
that will tell you the general cause for your specific error. In cell D9, the
e information on#N/A
the weberror is caused because there is no value matching "Apple". You can
ect errors in formulas
fix this by using a value that does exist, suppress the error with IFERROR, or
to avoid brokenignore
formulasit and know it will go away when you do use a value that exists.
uate a nested formula one step at a time
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 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.
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.

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


e. Errors can be helpful, because they point out when something's not working right, but they can be challenging to fix. Fortunately, there

Fruit Amount
Apples 50
Oranges 20
Bananas 60
Lemons 40

Apples 50

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 170

EXPERIMENT
What's wrong here? Hint: We're trying to SUM
up all the items.
What's wrong here? Hint: We're trying to SUM
up all the items.
g to fix. Fortunately, there are several options that can help you track down the source of the error, and fix it.
"Shipping".
formula
In cell F33, in cell As
you
D12.start
we've We got
entered
typing,
you Excel's
started
=IF(E33="Yes",
Next we've
auto-correct,
with
F31*SalesTax,
added an IFit
should
0), where find
=IF(C12<100,"L we
statement
for you. When to
ess
set than
up
calculate
Copy
it does,D9
100","Greater
SalesTax to
press
In cellThe
shipping
D10. D9ifas entera
it's
Tab
than
Named toorenter
equal
Range it.
=IF(C9="Apple
required.
answer here In
This
to
with is
100").a
a value What of
",TRUE,FALSE).
cell
EXPERT
should
Named F35 beyou'll
TIP
Range,
happens
0.0825.
The correctOurif you
see
Named
IF
FALSE,
and
enter
formula
answer
we IF statements
Ranges
statements
a issays If
=IF(E35="Yes",
allow
because
entered
IF you
statements
number
cell E33terms itanto allow you to make logical comparisons between conditions. An IF statement generally says that if one condition
equals
TRUE.
SUM(D28:D29)
define
orange is not
from
greater
Yes, Formulas
then than
*1.25,0).
or
an
>100 values
apple.
Define This
in a
says in
multiply cellcell
"Ifplace,
cell
single
Name. Now, IF statements
if allow you to make logical comparisons between conditions. An IF
C12?
F31
E35 istimes
Yes,need
and
you then
ever reuse
SalesTax,
TRUE
then
them
to andstatement
take
change FALSE generally
your are unlike
the othersays that
words in ifExcel
oneformulas
condition
in is true
that dodon't
they something,
need to otherwise doand Excel will automatically c
be in quotes,
otherwise something
=IF(C3="Apple","Yes","No")
sum of the
throughout a else. The formulas can return text, values, or even more calculations.
shipping
return a 0. cost,
Quantity
workbook.
Diveonly
you down have You
for more detail
column
can
to do see in
allone
it in the
of
Next
Try
table
the changing
above,
named
place, and inyou
Yes
IF
and to
ranges
IF
No
statement
multiply
inthe
statements this 1itwith another function
can
cell
by
use
E33 to by
1.25,
workbook seecan also force additional calculations to be performed if a certain condition is met. Here we're going to evaluate
Shipping
the calculationname
otherwise
going
anywhere to in
change.
return
Formulas a 0". >
the workbook.
Name 2
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

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 Sales Tax should be
charged, and calculate it if the condition is true.

3
3

Previous

More information on the web


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

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


E andstatement generally
FALSE are unlike othersays that
words in ifExcel
oneformulas
condition
in is true
that dodon't
they something,
need to otherwise doand Excel will automatically capitalize them.
be in quotes,
something else.
C3="Apple","Yes","No") The formulas can return text, values, or even more calculations.
e down for more detail

atements1with
atement In cell D9 enter =IF(C9="Apple",TRUE,FALSE). The correct answer is TRUE.
can another function
also force additional calculations to be performed if a certain condition is met. Here we're going to evaluate a cell to see if S

2 Copy D9 to D10. The answer here should be FALSE, because an orange is


not an apple.
OD TO KNOW
en you create a formula, Excel will automatically place colored borders around any ranges referenced in the formula, and the correspondin
3 Try another example by looking at the formula in cell D12. We got you
started with =IF(C12<100,"Less than 100","Greater than or equal to
100"). What happens if you enter a number greater than or equal to
re information on100the
in web
cell C12?
about the IF function
about the IFS function
Dive down for more detail
anced IF statements Next
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 Sales Tax should be
charged, and calculate it if the condition is true.

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


SalesTax as a Named Range with a value of 0.0825. Our formula says If cell
E33 equals Yes, then multiply cell F31 times SalesTax, 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 shipping 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 "Shipping". 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 entered it from Formulas >
Define Name. Now, if you ever need to change your shipping cost, you
3 Next, change the 1.25 in the formula in cell F35 to "Shipping". 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 entered it from Formulas >
Define Name. Now, if you ever need to change your shipping cost, you
only have to do it in one place, and you can use the Shipping 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


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

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 1
Orange 0

365 Greater than or equal to 100

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")

Item Quantity Cost Total


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

Sub-Total $13.18 $29.78

Sales Tax? Yes $2.46 GOOD TO KNOW


When you create a formula, Excel will auto
place colored borders around any ranges r
Shipping? Yes $6.25 the formula, and the corresponding ranges
formula will be the same color. You can see
select cell F33 and press F2 to edit the form
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
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.
r even more calculations.

es need to be in quotes like this:

ct cell F33 and press F2 to edit the formula.

KNOW
ate a formula, Excel will automatically
borders around any ranges referenced in
nd the corresponding ranges in the
e the same color. You can see this if you
and press F2 to edit the formula.
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.

Keep going. There is more to learn with Excel:

LinkedIn Learning Community


Video courses for all Ask questions and
levels—from beginner to connect with other
advanced. Take at your Excel fans.
own pace.
Learn more Learn more
What else is new?
Office 365 subscribers
get continual updates
and new features.

Learn more

You might also like