in this lesson we're going to explore
functions functions are predefined
formulas that perform calculations using
specific values in a particular order
while you may think of formulas as being
a short mathematical equation like f two
times C two they can be really lengthy
Excel even gives extra space here in the
formula bar to accommodate long formulas
functions can actually save you the time
of writing lengthy formulas because the
computation the function will perform is
predefined so that you don't have to
answer all the mathematical operators
for example let's say that we want to
find the total cost of all of our
inventory basically we want to add each
item in column G together instead of
writing a formula to add G 2 + G 3 + G 4
and so on we could use a function let's
scroll down to a 42 and type total
inventory cost and we're going to use a
function to add each item in column G
and place the total here in G 42 to
access our functions select the formulas
tab you'll see a variety of commands in
the function library group from here we
can access all of the available
functions in G 42 I want to insert a
function that adds or provides the sum
of all the cells in column G so let's
select the drop down arrow next to the
auto sum command and select sum you'll
see a formula has been defined in G 42
this is called a function I know this
looks a little different in the formulas
you're used to but don't worry I like
explain more about the function in a
minute you can see that the cells in the
column
are selected the autosum command
automatically selects the cells G 2
through G 41 this is called a range of
cells Excel essentially predicted those
were the cells I wanted based on where I
was inserting the function if I press
the Enter key or the enter button next
to the formula bar the total appears we
can see that our inventory is worth four
thousand three hundred seventy one
dollars and six cents now what if you
didn't want all of those cells selected
well you can edit the function let's
just select the cell and go up to our
formula bar we can edit the range right
now the function adds cells G to three G
41 if we don't want to include the cups
in our inventory total we can change
this to G 39 and then click the insert
icon we can see that the total has
changed to reflect our new range I
actually do want all my inventory
selected so let's just click undo on the
quick access toolbar to go back to our
original function now let's take a look
at the parts of the function in closer
detail each function has a specific
order called syntax which must be
strictly followed for the function to
work correctly all functions begin with
the equals sign after the equal sign you
have to define the function name in this
case it's some remember a function is a
predefined formula so this function
tells Excel that it will add
a group of cells the next part of the
function is the argument the information
enclosed in the parenthesis is an
argument the argument and this function
is G 2 through G 41 which represents a
range of cells you use the colon to
represent a range of cells the range
basically says that all the cells from
g2 to g4 t1 are included I another
language can be really confusing but it
is important to know you won't need to
know these terms to use the functions
but you will need to know them if you
use the Excel help tool you can also
have a function that has more than one
argument for example this function
calculates the sum of two ranges let's
take a look at how you can insert this
function into your spreadsheet we want
to calculate the total dollar amount we
have of cones and cups instead of using
the autosum command I can insert the
function another way first I need to
select the cell where I want the
function to appear then click the insert
function commands on the formulas tab a
dialog box appears by default the sum
function is selected but if I wanted to
perform another mathematical operation I
could use this search tool to find a
function that would perform the
calculation that I need all you have to
do is type a question in the search for
a function box and click go
or you can scroll through the list of
functions in the select a function field
as you select different functions a
description of the function will display
below describing what calculation the
function will perform if you would
prefer to narrow this list you can
select a category and only view these
types of functions we'll just select
some and click OK and the function
arguments dialog box appears so that I
can enter cells that I want to include
in the function
we'll make sure our cursor is in the
number one field and then find the area
of our spreadsheet where the cones are
listed now left-click and drag your
cursor to select cells G 21 through 26
and then release the mouse button we can
see now that the argument appears in the
number 1 field since we want to add
another arguments we'll just place our
cursor in the number 2 fields and in the
spreadsheet select cells G 40 and 41 and
the argument appears in the field if we
look at the spreadsheets we can see that
the function with two arguments appears
in the cell now click OK in the dialog
box and the function adds the amounts of
cups and cones we have together and
displays it in G 44 there are so many
ways you can write functions in so many
types of functions another simple
function that I can show you using the
inventory spreadsheets is the average
function this function computes the
average of a range of cells let's say we
want to calculate the average cost we
pay for a 2.5 gallons help of ice cream
the price varies a bit depending on the
flavor but we want to find the average
cost and a 46 I'll type average flavor
and then select c-46 where I want the
function to appear now if I click the
drop down arrow next to the autosum
command and select average we can see
that Excel automatically selects all the
cells and column C but wait I only want
to find the average cost that I pay for
a 2.5 gallon tub of ice cream Excel
automatically chose all of the cells but
it's not quite right so all I need to do
is left-click and drag to select the
cells I want to average as I'm dragging
my mouse and selecting the cells I can
see in the formula bar how the formula
is changing once the correct cells are
selected I can click the insert icon and
see that the amounts listed is the
average cost for a 2.5 gallon tub of ice
cream ok this is something I need to
point out really quickly if you look
closely a small green triangle and an
exclamation mark appeared in the left
corner of the cell where I was
calculating my average this usually
indicates some type of mistake so let's
take a quick look if I scroll over the
exclamation point I can select the drop
down arrow which will give me a list of
options I don't want to include the
adjacent cells
so I'll just ignore this error one of
the many great features in excel is that
it will catch your mistakes for you and
make suggestions on how to fix those
mistakes sum and average are just two of
the most commonly used functions you can
use functions to accomplish a variety of
mathematical calculations from the
functional library you can see some of
the categories of functions there are
financial functions that will help you
work with interest rates calculate loan
payments and determine depreciation
amounts
there are dates and time functions that
will help you do things like calculate
the number of days between two dates
there are math and trig functions and so
much more Excel literally has hundreds
of different functions to assist you
with your calculations building formulas
can be difficult and time-consuming
excels functions can save you a lot of
time and headaches