Formula Tutorial1 PDF
Formula Tutorial1 PDF
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.
Go back to top by pressing CTRL+HOME. To start the tour, press CTRL+PAGE DOWN.
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:
start with an equals (=) sign.
Formulas: Answers:
To Add, select cell F3, type =C3+C4, then press Enter. 1 Addition (+) 3
You
To Subtract, can cell
select Add,
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
canAdd,
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 information on the web
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
referenced in your formulas.
=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
More information on the web Opening parenthesis Closing parenthesis. Excel will usually add this
for you when you press Enter.
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.
The function The first Additional
name. argument. It's arguments,
Item Amount
almost always separated by
Cars 20
required. commas (,).
Trucks 10
Bikes 10
Skates 40
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.
EXTRA CREDIT
Try using MEDIAN or MODE here.
More information on the web
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.
3
KNOW Donuts 100 Donuts 100
In cell D15, you can use either the AutoSum Wizard, or type to enter a MIN or
Cookies 40 Cookies 40
MAX function.
Cakes 50 Cakes 50
Pies 20 Pies 20
MIN or MAX > 10
GOOD TO KNOW
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.
also add and subtract Dates.
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
DETAIL Your birthday:
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
More information on random
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
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.
here to learn more.
Advanced IF statements
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".
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:
=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.
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
GOOD TO KNOW
You can type cell and range references, or select them
with your mouse.
GOOD TO KNOW
As you enter each argument's section, the argument's
description will be displayed toward the bottom of the form,
above the Formula result.
GOOD TO KNOW
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.