Вы находитесь на странице: 1из 14

# Get started with formulas

In just a few steps, you'll be up and running with building formulas and functions in Excel, the

Basics: doing math with Excel
Basics: doing math with Excel
You can Add, Subtract, Multiply, and Divide in Excel without using any built-in functions. You just need to use some basic operators: Numbers+, -,to*,use:
/. All formulas
Operation:
To Add, select cell F3, type =C3+C4, then press Enter. 1 Addition (+) 3
You
To Subtract, can cell
F4,Subtract, Multiply,
type =C3-C4, and Enter.
then press Divide in Excel without using any built-in functions. 2 Subtraction (-) -1
You just need to use some basic operators: +, -, *, /. All formulas start with an equals (=)
To Multiply, select cell F5, type =C3*C4, then press Enter. Multiplication (*) 2
sign.
To Divide, select cell F6, type =C3/C4, then press Enter. Division (/) 0.5
Check this out: change the numbers in cells C3 and C4, and watch the formula results automatically change. Power (^) 1
EXTRA CREDIT: 1 You To
raise select
a valuecell
to aF3, typeby=C3+C4,
power using thethen
caratpress Enter.like =A1^A2. Enter it with Shift+6. In cell F7, enter =C3^C4.
(^) symbol,
CHECK THIS OUT EXTRA CREDIT
Dive down for more detail
Change the numbers here, and You can raise a value to a
Next step
2 To cells,
More about formulas, Subtract, select cell F4, type =C3-C4, then press Enter.
and ranges
watch the formula results power by using the carat (^)
symbol, like =C3^C4. Enter
automatically change.
Excel is made up of individual cells that are grouped into rows and columns. Rows are numbered, and columns are lettered. There are over 1 million rows and 16,000 columns, and you can put formulas
it with in any of them.
Shift+6.
Formulas can
You'll notice 3
that in To
ourMultiply, select
third example cell we
above, F5, used
type the
=C3*C4, then press
SUM function. Enter.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 funct
A function
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.
Some formula 4explanations
To Divide, select cell F6, type =C3/C4, then press Enter.
=10*20 is a formula, where 10 and 20 are constants, and the * sign is the operator.
=SUM(A1:A10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula arguments, and A1:A10 is the cell range for the function.
=SUM(A1:A10,C1:C10) is a formula, where SUM is the function name, the opening and closing parentheses contain the formula arguments, and A1:A10,C1:C10 are the cell ranges for the function separated by a comma.
GOOD TO Dive down for more detail Next step
Previous
Next
More about formulas, cells, and ranges
Use Excel as a calculator
Overview Excel
of formulas in Excel
is made up of individual cells that are grouped into rows and columns. Rows are
Excel functions (by category)
numbered, and columns are lettered. There are over 1 million rows and 16,000 columns, GOOD TO KNOW
Operator Operator Constants are values that you enter in cells or formulas.
and you
Excel functions can put formulas in any of them.
(alphabetical)

=A1+
While =10*20 might calculate the same as =A1+B1, constants
Free ExcelFormulas can contain cell references, ranges of cell references, operators, and constants.
training online
The following are all examples of formulas: Cel =10*20 aren't a good practice. Why? Because you can't easily see the
constant without selecting the cell and looking for it. That
can make it hard to change later. It's much easier to put your
l Cell
=A1+B1
=10*20 B1 ref
ere
referenc
e
Constant Constant constants in cells, where they can be easily adjusted, and
=SUM(A1:A10) nce
For example: Select the yellow cell with 12 below. You'll see
You'll notice that in our third example above, we used the SUM function. A function is a we used the SUM function with a range of cells. We didn't
pre-built command that takes a value or values, calculates them in a certain way, and Function Argument type in "4" or "8" directly into the formula.
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:A10) Values
4
Formulas with functions start with an equals sign, then the function name follows with its A range of cells has a starting cell, colon, and an
8
arguments (the values a function uses to calculate) wrapped in parentheses. ending cell. When you select a range of cells for a
formula, Excel will automatically add the colon. 12
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 Commas separate multiple
bar beneath the Ribbon, or press F2 to enter Edit mode, where you'll see the formula in the arguments
cell. Press Enter again to finalize the formula and calculate the result.
Function Argument Argument

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

for you when you press Enter.

## Free Excel training online

it takes the cells A1 through A10, and totals them. Excel has over 400 functions, which you can explore on the Formulas tab.
Introduction to functions
Introduction to functions
Functions give you the ability to do a variety of things, like perform mathematical operations, look up values, or even calculate Fruit dates and times. Let's
Amount
try a fewMeat
ways to add up values withAmount
the SUM function.
Under the Apples 50 Beef 50
Functions
Now let's try AutoSum. give youthe
Select thecell
ability
under tothe
do column
a variety
forofMeat
things,
(celllike
G7),perform
then go mathematical
to Formulas > AutoSum > select SUM.Oranges
You'll see Excel automatically 20
enter the
Chicken
formula for you. Press Enter to30
confirm it. The AutoSum feature has all of the most commo
operations,
Here's a neat keyboardlook up values,
shortcut. Select or
celleven
D15, calculate
then pressdates
Alt =,and
thentimes.
Enter. Let's try a few ways
enters SUMupfor you. Bananas 60 Pork 10
Dive downvalues with
for more the SUM function.
detail Lemons 40 Fish 50
EXTRA CREDITTry the COUNT function using any of the methods you've already tried. The COUNT function counts the number SUMof > cells in a range that contain
170 numbers.
SUM >
Next step 1 Under the Amount column for Fruit (cell D7), enter =SUM(D3:D6), or type =SUM(,
More about functionsthen select that range with the mouse, and press Enter. This will sum the values in Item Amount Item Amount
Go to the Formulas cells
tabD3,andD4, D5, and
browse D6. Your
Function should be 170.
Library, where functions are listed by category, like Text, BreadDate & Time, etc. Insert 50 FunctionBreadwill let you search for functions
50 by name, and launch a function wizard that can hel
2 Now let's try AutoSum. Select the yellow cell under the column for Meat (cell
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. SUM Donuts
is the function name, D38:D41 100
is the Donuts
first range argument, which is almost
100 always required, and H:H is the second range argument,
The TODAY functionG7), thentoday's
returns go to date.
Formulas
It will > AutoSum >update
automatically selectwhen
SUM.Excel
You'll see Excel
CHECK THIS OUTSelectautomatically
these cells. enter
Then in thetheformula for you.
lower-right cornerPress Enter
of the Exceltowindow,
confirmlook
it. The AutoSum
for SUM: 170 in the bottom bar.
Cakes
That's called the Status Bar, 50
and it'sCakes
just another way to quickly find 50
a total and other details about a selected cell or range.
IMPORTANT feature has all of the most common functions. Pies 20 Pies 20
Here's a neat keyboard shortcut. Select cell D15, then press Alt =
Use AutoSum to sum then, Enter. This automatically enters SUM for you.
numbers EXTRA CREDIT
All about the COUNT function Try the COUNT function using any of
Free Excel training online the methods you've already tried.
Next step number of cells in a range that
contain numbers.

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

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
Fruit Amount
parenthesis for you. It will also display the optional and required arguments. CHECK THIS OUT
Apples 50
Oranges 20 Select these cells. Then in the lower-right
Bananas 60 corner of the Excel window, look for this:
Lemons 40
Now let's look at the anatomy of a few functions. The SUM function is structured like this:
SUM > 170
That's called the Status Bar, and it's just
another way to quickly find a total and other
details about a selected cell or range.
name. argument. It's arguments,
Item Amount
almost always separated by
Cars 20
required. commas (,).
Trucks 10
Bikes 10
Skates 40

## =SUM(D38:D41,H:H) Total: Additional Value New Total

180 100 180
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. IMPORTANT DETAIL
Double-click this cell. You'll notice the 100 toward the end.
The TODAY function returns today's date. It will Although it's possible to put numbers in a formula like this,
automatically update when Excel recalculates. 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
=TODAY() inside a formula.

## Free Excel training online

AVERAGE
function AVERAGE function
Use the AVERAGE function to get the average of numbers in a range of cells. Fruit Amount Meat Amount
Select cellUse
D7,the AVERAGE
then function
use AutoSum to to
anthe averagefunction.
AVERAGE of numbers in a range of cells. Apples 50 Beef 50 CHECK THIS OUT
Now select cell G7, and enter an AVERAGE function by typing =AVERAGE(G3:G6). Oranges 20 Chicken 30 Select any range of numbers,
In cell D15, 1you can
Select cell D7, then use AutoSum then look in the Status Bar for an
use either AutoSum, or type to to addanother
enter an AVERAGE
AVERAGEfunction.
function. Bananas 60 Pork 10
instant Average.
CHECK THIS Lemons 40 Fish 50
Activate the previous sheet AVERAGE > AVERAGE >
2
Go to the next sheet
Now select cell G7, and enter an AVERAGE function by typing
=AVERAGE(G3:G6).
EXTRA CREDIT Item Amount Item Amount
3 In the
Select to learn all about cellAVERAGE
D15, you can use
function on either
the webAutoSum, or type to enter another AVERAGE Donuts 100 Donuts 100
function.
Select to learn all about the MODE function on the web Cakes 50 Cakes 50
Select to learn about free Excel training on the web Pies 20 Pies 20
Previous Next AVERAGE >

EXTRA CREDIT
Try using MEDIAN or MODE here.
MEDIAN gives you the value in the
All about the AVERAGE function middle of the data set, while
MODE gives the one that occurs
All about the MEDIAN function 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.

Free Excel training online
MIN and MAX functions
MIN and MAX functions
Use the MIN function to get the minumum number in a range of cells. Fruit Amount Meat Amount
Use thecell
Select MAX Use
D7, the MIN
function function
to get to getnumber
the maximum the smallest number
in a range of cells.in a range of cells. Apples 50 Beef 50
then use
Now the
select Use
cell the MAX function to get the largest number in a range of cells. Oranges 20 Chicken 30
G7,cell
In and enter
D15, youa Bananas 60 Pork 10
can use either1
More Select cell D7, then use the AutoSum Wizard to add a MIN function. Lemons 40 Fish 50
information on MIN > MAX >
All aobut the MIN function
2 function
Now select cell G7, and enter a MAX function by typing =MAX(D3:D6).
Item Amount Item Amount
Free Excel

3
KNOW Donuts 100 Donuts 100
In cell D15, you can use either the AutoSum Wizard, or type to enter a MIN or
MAX function.
Cakes 50 Cakes 50
Pies 20 Pies 20
MIN or MAX > 10

GOOD TO KNOW

You can use either MIN or MAX with multiple
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), 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
All about the MAX function never return a result less than 10.
Free Excel training online
Free Excel training online
Date functions
Date functions
Excel can give you the current date, based on your computer's regional settings. You can also add and subtract Dates.

Excel can give you the current date, based on your computer's regional settings. You can
Check out the TODAY function, which gives you Today's date. These are live, or volatile functions, so when you open your workbook tomorrow, it will have tomorrow's date. Enter =TODAY() in cell D6.
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.
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 Datefind out.
functions
In cell D10, enter a random number of days. In cell D11, we added =D6+D10 to calculate the due date from today.
IMPORTANT
1 Check out the TODAY function, which gives you Today's date. These are live, or
GOOD TO KNOWExcel keeps dates and times based on the number of days starting from January 1, 1900. Times are keptToday's in fractional
date: 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 ca
volatile functions, so when you open your workbook tomorrow, it will have
tomorrow's date. Enter =TODAY() in cell D6.
Time functions Days until your birthday: IMPORTANT DETAIL
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 If you don't want
employee Excel
worked to display
each a negative
week, and number,
calculate their pay and overtime.
In cell D28, 2 Subtract Dates - Enter your next birthday in MM/DD/YY format in cell D7, and
Grace period days: because you haven't entered your birthday yet, you can
Add up hours watch Excel tell you how many days away it is by using =D7-D6 in cell D8. use an IF function like this: =IF(D7="","",D7-D6), which
Bill due on:
says, "IF D7 equals nothing, then show nothing, otherwise
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.
Previous 3 Add Dates - Let's say you want to know what date a bill is due, or when you need to show D7 minus D6".

Next return a library book. You can add days to a date to find out. In cell D10, enter a GOOD TO KNOW
the web number of days. In cell D11, we added =D6+D10 to calculate the due date Excel keeps dates and times based on the number of days
All about the TODAY from today.
function starting from January 1, 1900. Times are kept in fractional
All about the NOW function portions of a day based on minutes. So 01/01/2017 12:30
All about the DATE function PM is actually stored as 42736.5208. If the Time or Date
show up as numbers like that, then you can press Ctrl+1 >
Free Excel training online
Time functions Number > select a Date or Time format.

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 Time functions
each time Excel calculates. If you need to change the Time format, you can go to Current Time:
Ctrl+1 > Number > Time > Select the format you want.

2 Add up hours between times - In cell D36 we've entered =((D35-D32)-(D34- Daily Hours Worked
D33))*24, which calculates someone's start and end times, then subracts the Time In: 8:00 AM
time they took for lunch. The *24 at the end of the formula converts the Lunch Out: 12:00 PM
fractional portion of the day that Excel sees into hours. You'll need to format Lunch In: 1:00 PM
the cell as a Number though. To do that, go to Home > Format > Cells Time Out: 5:00 PM
(Ctrl+1) > Number > Number > 2 decimals. Total Hours: 8

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
Time Out Lunch Out
Static Date & Time
Date: 09-27-17
=((D35-D32)-(D34-D33))*24 Time: 8:52 AM

Time In Lunch In

GOOD TO KNOW
You can use keyboard shortcuts to enter Dates and
Times that won't continuously change:
The inner parentheses () make sure Excel calculates those
parts of the formula by themselves. The outer parentheses make sure Date - Ctrl+;
Excel multiplies the final inner result by 24. Time - Ctrl+Shift+:

Previous Next

## Free Excel training online

Joining text from different cells
Joining text from different cells
There are many times in Excel when you want to join text that's in different cells. This example is very common, where youFirst have
Name
first and last names,
Last Name
and want toLast
combine
Name,them
Firstas
Name
first name,
Fulllast
Namename, or full name. Fortunately, Excel lets us do that with the
In cell E3, enter =D3&C3 to join the last and first names. Nancy Smith Smith, Nancy Nancy Smith
SmithNancy There are look
doesn't many times
quite in though.
right Excel when you want
commatextand
that's in different
a space. cells.
To do that This
we'll use quotes to create Andy
a new text string. ThisNorth
time, enter =D3&", "&C3. The &", "& portion lets us join a comma and space with the text in the cells.
example
To create the is very
full name, common,
we'll where
join first and lastyou have
name, butfirst
useand last without
a space names, aand want In
comma. toF3,
combine them"&D3.
enter =C3&" Jan Kotas
Dive downasforfirst
morename,
detaillast name, or full name. Fortunately, Excel lets us do that with the Ampersand Mariya Jones
Next (&) sign, which you can enter with Shift+7. Steven Thorpe
Using text and numbers together Michael Neipper
Now we'll use1 the &Intocell
joinE3,
textenter =D3&C3not
and numbers, to join the and
just text last text
andLook
firstat
names.
cells C28:D29. See how the date and times areRobertin separate cells? YouZare
can join them together with the & symbol like you'll see in cells C32:C33, but that doesn't look right, does it? Unf
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. Yvonne McKay
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.
CHECK THIS OUT2 Formulas,
SmithNancy doesn't look quite right though. We need to add a comma and a
especially big ones, can sometimes be hard to read, but you can break up their parts with spaces like this:=C28 & " " & TEXT(D28,"MM/DD/YYYY")
space. To do that we'll use quotes to create a new text string. This time, enter
WORTH EXPLORINGIf 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.
=D3&", "&C3. The &", "& portion lets us join a comma and space with the text
in the cells.
Combine text and numbers
3 online
Free Excel training
To create the full name, we'll join first and last name, but use a space without a
comma. In F3, enter =C3&" "&D3.

## Using text and numbers together

Using text & numbers
Now we'll use the & to join text and numbers, not just text and text Today's date: 11-30-19
Current time: 3:01 PM
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 Joining text & numbers
it? Unfortunately, Excel doesn't know how you want to format the numbers, so it breaks Today's date: 43799
them down to their basest format, which is the the Serial date in this case. We need to Current time: 43799.6257273148
explicity tell Excel how to format the number portion of the formula, so it displays the way CHECK THIS OUT
you want in the resulting text string. You can do that with the TEXT function and a format Formatting text & numbers
Formulas, especially big ones, can sometimes
code. Today's date: 11/30/2019
be hard to read, but you can break up their
Current time: 03:01 PM parts with spaces like this:
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. =C28 & " " & TEXT(D28,"MM/DD/YYYY")

## 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 EXPLORING
If you don't know what format code to use, you can
use Ctrl+1 > Number to format any cell the way you
Previous Next want. Then select the Custom option. You can copy
the format code that's displayed back to your
formula.

## Free Excel training online

IF statements
IF statements
IF statements allow you to make logical comparisons between conditions. An IF statement generally says that if one condition is true do something, otherwise do something else. The formulas can return text, values, or even more calculations.
In cell D9
Copy D9 to IF statements allow you to make logical comparisons between conditions. An IF statement
Try anothergenerally says that if one condition is true do something, otherwise do something else. The
IMPORTANT formulas can return
DETAILTRUE text, are
and FALSE values, orother
unlike evenwords
more in
calculations.
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")
Dive down for more detail
Next IF statements
IF statement1with another
In cell D9 enter =IF(C9="Apple",TRUE,FALSE). The correct answer is TRUE.
function Apple
IF statements can also force additional calculations to be performed if a certain condition is met. Here we're going to evaluate
Orangea cell to see if Sales Tax should be charged, and calculate it if the condition is true.
In cell F33,
Next we've 2 Copy D9 to D10. The answer here should be FALSE, because an orange is not an 50 Less than 100
Next, change apple.
GOOD TO KNOWWhen you create a formula, Excel will automatically place colored borders around any ranges referenced in 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 edit the formula.
EXPERT TIP 3 Try another example by looking at the formula in cell D12. We got you started IMPORTANT DETAIL
Previous with =IF(C12<100,"Less than 100","Greater than or equal to 100"). What TRUE and FALSE are unlike other words in Excel formulas in
Next happens if you enter a number greater than or equal to that they don't need to be in quotes, and Excel will
cell C12? automatically capitalize them. Numbers don't need to be in
All about the IF function quotes either. Regular text, like Yes or No does need to be
All about the IFS function in quotes like this:
Advanced IF statementsDive down for more detail Next =IF(C3="Apple","Yes","No")
Free Excel training online

## IF statement with another function

Item Quantity Cost Total
IF statements can also force additional calculations to be performed if a certain condition is Widget 2 \$9.76 \$19.52
met. Here we're going to evaluate a cell to see if Sales Tax should be charged, and calculate Doohickey 3 \$3.42 \$10.26
it if the condition is true.
Sub-Total \$13.18 \$29.78
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 Sales Tax? Yes \$2.46 GOOD TO KNOW
equals Yes, then multiply cell F31 times SalesTax, otherwise return a 0. When you create a formula, Excel will automatically
Shipping? Yes \$6.25 place colored borders around any ranges referenced in
the formula, and the corresponding ranges in the
Try changing Yes to No in cell E33 to see the calculation change.
formula will be the same color. You can see this if you
Total \$38.48 select cell F33 and press F2 to edit the formula.
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 EXPERT TIP
typing, Excel's auto-correct, should find it for you. When it does, press Tab to Named Ranges allow you to define terms or values in a
enter it. This is a Named Range, and we entered it from Formulas > Define single place, and then reuse them throughout a
Name. Now, if you ever need to change your shipping cost, you only have to do workbook. You can see all of the named ranges in this
workbook by going to Formulas > Name Manager. Click
it in one place, and you can use the Shipping name anywhere in the workbook.

## Free Excel training online

VLOOKUP
VLOOKUP
VLOOKUP 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 the left, then returns information in another column to the right if it finds a match. VLOOKUP says:
=VLOOKUP(A1,B:C,2,FALSE)
What do youVLOOKUP
want to is one
look of the most widely used functions in Excel (and one of our favorites too!).
for?
If you findVLOOKUP
it, how manyletscolumns
you look up aright
to the valuedoin a column
you on the
want to get left, then returns information in
a value?
Where do you want to look forthe
another column to it? right if it finds a match. VLOOKUP says:
Do you want an exact, or approximate match?
What do you If you find it, how many
In cell D22,
want to look columns to the right do you
Now try for
for? want to get a value?
EXPERIMENTTry selecting different items from the drop down lists. You'll see the result cells instantly update themselves with new values.
Dive down for more detail
Next
VLOOKUP and #N/A =VLOOKUP(A1,B:C,2,FALSE)
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.
If you know
If you're not Where do you Do you want Fruit Amount Meat Amount
IMPORTANT DETAILIFERROR is what's known as a want blanket
to error
look handler, anmeaning
exact, orit will suppress any error your formula might
Applesthrow. This can cause problems
50 Beef
if Excel is giving you a notification
50 that your formula has a legitimate error that needs to be fixed.A rule of thumb is
Previous for it? approximate Oranges 20 Chicken 30
Next match? Bananas 60 Pork 10
1
In cell D22, enter =VLOOKUP(C22,C17:D20,2,FALSE). The correct answer for
Apples isfunctions
50. VLOOKUP looked for Apples, found it, then went over one column Apples Pork
All about the IFERROR to function
the right, and returned the amount.
Use PivotTables to analyze worksheet data
2 online
Free Excel training Now try for yourself in the Meat section, in cell G22. You should end up with EXPERIMENT
=VLOOKUP(F22,F17:G20,2,FALSE). Try selecting different items from the drop down lists. You'll see
the result cells instantly update themselves with new values.

## Dive down for more detail Next

VLOOKUP and #N/A If the SUM function in cell D42 could talk, it would say this: Sum up the values in cells D38, D39, D40, and D41.
Item Amount Item Amount
Invariably, you'll run into a situation where VLOOKUP can't find what you asked it to, and it Bread 50 Bread 50
returns an error (#N/A). Sometimes, it's because the lookup value simply doesn't exist, or it Donuts 100 Donuts 100
can because the reference cell doesn't have a value yet. Cookies 40 Cookies 40
Cakes 50 Cakes 50
1 If you know your lookup value exists, but want to hide the error if the lookup cell is
Pies 20 Pies 20
blank, you can use an IF statement. In this case, we'll wrap our existing VLOOKUP
formula like this in cell D43: #N/A Pastry

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

This says, "If cell C43 equals nothing (""), then return nothing, otherwise return the IMPORTANT DETAIL
VLOOKUP's results". Note the second closing parenthesis at the end of the IFERROR is what's known as a blanket error handler, meaning it
formula. This closes the IF statement. will suppress any error your formula might throw. This can
cause problems if Excel is giving you a notification that your
2 If you're not sure your lookup value exists, but you still want to suppress the formula has a legitimate error that needs to be fixed.
#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 A rule of thumb is to not add error handlers to your formulas
VLOOKUP returns a valid result, then display that, otherwise, display nothing until you're absolutely certain they work properly.
("")". We displayed nothing here (""), but you can also use numbers (0,1, 2, etc.),
or text, such as "Formula isn't correct".

## Free Excel training online

Conditional functions - SUMIF
Conditional functions - SUMIF
Conditional functions let you sum, average, count or get the min or max of a range based on a given condition, or criteria Fruit
you specify. Such as,Amount
out of all the fruits in
Fruit
the list, how many
Type are apples? Or, how
Amount
many oranges are the Florida type?
SUMIF lets you sum in one range based on a specifc criteria you look for in another range, like how many Apples you have. Apples
Select cell D17 and type 50 =SUMIF(C3:C14,C17,D3:D14).
Apples SUMIF
Fuji is structured like this:50
Conditional functions let you sum, average, count or get the min or max of a range based
=SUMIF(C3:C14,C17,D3:D4) Oranges 20 Oranges Florida 20
on a given condition, or criteria you specify. Such as, out of all the fruits in the list, how
What range do you want to look at? Bananas 60 Bananas Cavendish 60
many are apples? Or, how many oranges are the Florida type?
What value (text or number) do you want to look for? Lemons 40 Lemons Rough 40
For each match found, what range do you want to sum in? Apples 50 Apples Honeycrisp 50
SUMIFS is the 1 sameSUMIF letsbut
as SUMIF, youitsum in one
lets you use range
multiplebased on So
criteria. a specifc criteria you
in this example, youlook for infor Fruit and Type, instead
can look Oranges
of just by Fruit. Select cell
20 H17 and type Oranges
=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17).
Navel 20SUMIFS is structured like this:
another range, like how many Apples you have. Select cell D17 and type
=SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17) Bananas 60 Bananas Lady Finger 60
What range do you=SUMIF(C3:C14,C17,D3:D14).
want to sum? SUMIF is structured like this: Lemons 40 Lemons Eureka 40
This is the first range to look in for matches Apples 50 Apples Honeycrisp 50
This is the criteria for the first matchWhat range do you For each match found, what Oranges 20 Oranges Navel 20
This is the want to look at? range do you want to sum? Bananas 60 Bananas Cavendish 60
This is the criteria for the second match Lemons 40 Lemons Eureka 40
EXPERT TIP
=SUMIF(C3:C14,C17,D3:D4)
Dive down for more detail Fruit SUMIF Fruit Type SUMIFS
Next step Apples Oranges Florida
Conditional functions - COUNTIF
COUNTIF and COUNTIFS let you count values inWhat a range based
value onora number)
(text criteria you specify. They're a bit different from the other IF and IFS functions, in that they only have a criteria range, and criteria. TheyEXPERTdon't evalute
TIP one range, then look in another to summarize.
Select cell D64 and type =COUNTIF(C50:C61,C64). do COUNTIF
you wantistostructured
look for? like this: Each one of the Fruit and Type cells has a
=COUNTIF(C50:C61,C64) drop-down list where you can select
What range do you want to look at? different fruits. Try it, and watch the
What value2(text or number) do you want to look for?
SUMIFS is the same as SUMIF, but it lets you use multiple criteria. So in this formulas automatically update.
example, you can look for Fruit and Type, instead of just by Fruit. Select cell H17
COUNTIFS is
and type =SUMIFS(H3:H14,F3:F14,F17,G3:G14,G17). SUMIFS is structured like
=COUNTIFS(F50:F61,F64,G50:G61,G64)
this:
This is the first range to count
This is the criteria for the firstWhat
matchrange This is the This is the
This is the second range to count do you want criteria for the criteria for the
This is criteria for the second tomatch
sum? first match second match
Dive down for more detail
Next
More conditional functions
You've
=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 This isthan
the first
(>) to find all values This is the
greater than a given amount:
200 range to look second range
Sum up some values based on this criterion: in for matches to look in for
....Look through these cells... matches
...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 PivotTable article for more information.
the web Next
Conditional functions - COUNTIF
All about the AVERAGEIFS function Fruit Amount Fruit Type Amount
the MINIFSandfunction
COUNTIFS let you count values in a range based on a criteria you specify. Apples 50 Apples Fuji 50
the MAXIFS
a bitfunction
different from the other IF and IFS functions, in that they only have a criteria Oranges 20 Oranges Florida 20
Create a drop-down list
range, and criteria. They don't evalute one range, then look in another to summarize. Bananas 60 Bananas Cavendish 60
Free Excel training online Lemons 40 Lemons Rough 40
Next 1 Select cell D64 and type =COUNTIF(C50:C61,C64). COUNTIF is structured like Oranges 20 Oranges Navel 20
this: Bananas 60 Bananas Lady Finger 60
What range do you Lemons 40 Lemons Eureka 40
want to look at? Apples 50 Apples Honeycrisp 50
Oranges 20 Oranges Navel 20
Bananas 60 Bananas Cavendish 60
=COUNTIF(C50:C61,C64) Lemons 40 Lemons Eureka 40

## Fruit COUNTIF Fruit Type COUNTIFS

Apples 3 Oranges Florida 1
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) GOOD TO KNOW

Double-click this cell and you'll see that the formula is
different. Specifically, the sum criteria is ">=50" which
This is the criteria This is criteria for means greater than or equal to 50. There are other
for the first match the second match operators you can use like "<=50" which is less than or
equal to 50. And there's "<>50" which is not equals
50.

## More conditional functions

Fruit Type Amount
You've already seen SUMIF, SUMIFS, COUNTIF, and COUNTIFS. Now you can try on your Apples Fuji 50
Oranges Florida 20
own with the other functions, such as AVERAGEIF/S, MAXIFS, MINIFS. They're all
Bananas Cavendish 60
structured the same way, so once you get one formula written, you can just replace the
Lemons Rough 40
function name with the one you want. We've written all the functions you'll need for cell
Apples Honeycrisp 50
E106, so you can copy/paste these, or try to type them yourself for practice.
Oranges Navel 20
SUMIF =SUMIF(C92:C103,C106,E92:E103)
Lemons Eureka 40
SUMIFS =SUMIFS(E92:E103,C92:C103,C106,D92:D103,D106)
Apples Honeycrisp 50
AVERAGEIF =AVERAGEIF(C92:C103,C106,E92:E103)
Oranges Navel 20
AVERAGEIFS =AVERAGEIFS(E92:E103,C92:C103,C106,D92:D92,D106)
Bananas Cavendish 60
COUNTIF =COUNTIF(C92:C103,C106)
Lemons Eureka 40
COUNTIFS =COUNTIFS(C92:C103,C106,D92:D103,D106)
MAXIFS =MAXIFS(E92:E103,C92:C103,C106,D92:D103,D106) Fruit Type Try it
MINIFS =MINIFS(E92:E103,C92:C103,C106,D92:D103,D106) Lemons Eureka 80

## SUMIF with a value argument

Here's an example of the SUMIF function using greater than ( >) to find all values greater
Item Amount
than a given amount:
Donuts 100
Sum up some ....Look through ...and if the
values based these cells... value is greater
Cakes 50
on this than 50, sum it
Pies 20
criterion: up.
200

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

## Create a drop-down list Free Excel training online

Let the Function Wizard guide you
Let the Function Wizard guide you
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.
Select cell D10,
Next, enterIf the
you know the name of the function you want, but you're not sure how to build it, you Fruit Amount
CHECK THIS can use the Function Wizard to help you out. Apples 50
GOOD TO KNOWYou can type cell and range references, or select them with your mouse. Oranges 20
GOOD TO 1 Select cell D10, then go to Formulas > Insert Function > type VLOOKUP in Bananas 60
Previous the Search for a function box, and press GO. When you see VLOOKUP Lemons 40
Next highlighted, click OK at the bottom. When you select a function in the list,
the web Apples 50
Overview of formulas in Excel
Excel functions2 (by category)
Next, enter the function arguments in their respective text boxes. As you enter
each one, Excel will evaluate it, and show you its result, with the final result at
Excel functions (alphabetical) CHECK THIS OUT
the bottom. Press OK when you're done, and Excel will enter the formula for
Free Excel training online You should end up with
you. =VLOOKUP(C10,C5:D8,2,FALSE)

GOOD TO KNOW
You can type cell and range references, or select them

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.

Overview of formulas in Excel

## Free Excel training online

Fixing formula errors
Fixing formula errors
At some point in time, you'll run across a formula that has an error, which Excel will display with #ErrorName. Errors can be helpful, because they point out when something's not working right, but they can be challenging to fix. Fortunately, there
Error checking - Go to Formulas > Error Checking. This will load a dialog that will tell you the general cause for your specific Fruit
error. In cell D9, the #N/A
Amount
error is caused because there is no value matching "Apple". You can fix this by using a value tha
If you clickAt some
Help point
on this in time,
Error, you'll
a help topicrun across
specific to athe
formula that haswill
error message anopen.
error,Ifwhich Excel
you click willCalculation
Show display Steps, an Apples
50
with #ErrorName. Errors can be helpful, because they point out when something's not
Each time you click Evaluate, Excel will step through the formula one section at a time. It won't necessarily tell you why an Oranges
error occurs, but it will point20out where. From there, look at the help topic to deduce what went wrong with your formula
EXPERIMENT working
What'sright,
wrong but theyHint:
here? can We're
be challenging
trying to SUM to fix.
up Fortunately,
all the items.there are several options that Bananas 60
GOOD TO can help you track down the source of the error, and fix it. Lemons 40
Previous
Next
1 Error checking - Go to Formulas > Error Checking. This will load a dialog that
Apple #N/A
will tell you the general cause for your specific error. In cell D9, the #N/A error is
the webbecause there is no value matching "Apple". You can fix this by using a
Detect errors in formulas
value that does exist, suppress the error with IFERROR, or ignore it and know it
How to avoid broken willformulas
go away when you do use a value that exists.
Evaluate a nested formula one step at a time
Free Excel training online

GOOD TO KNOW
2 If you click Help on this Error, a help topic specific to the error message will
Clicking Options will let you set the
open. If you click Show Calculation Steps, an Evaluate Formula dialog will load. 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.

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.

Detect errors in formulas

## Free Excel training online

Press ALT+Q and type what you want to know.
Keep going. There is more to learn with Excel:
Community: Ask questions and connect with other Excel fans.
What else
Give us feedback on this tour
Click the Tell Me button and type what you want to know.

## LinkedIn Learning Community What else is new?

Video courses for all Ask questions and Office 365 subscribers
levels—from beginner to connect with other get continual updates