Excel Functions
Excel Functions
FUNCTIONS
Wasim Patwari
Empowering aspiring data professionals
through our structured Internship Program,
Mentorship Program, and Job Assistance
guiding your journey from skill-building to
career success.
OBJECTIVES
PREREQUISITES
SYMBOL
KEY Note
Tip Activity
CONTENTS
Introduction to Formulas.................................................................3
1−A: The Components of an Excel Formula ............................................4
1−B: Entering Formulas ..........................................................................................6
1−C: Cell References in Formulas ..................................................................9
Introduction to Functions...............................................................13
2−A: The Components of an Excel Function..........................................14
2−B: Using the AutoSum Feature .................................................................15
2−C: Entering Basic Functions ........................................................................17
2−D: Inserting Functions .....................................................................................21
Working with Formulas..................................................................25
3−A: Relative vs. Absolute Cell Referencing ........................................26
3−B: Copying Formulas.......................................................................................27
3−C: Editing Formulas .........................................................................................29
3−D: Making Sense of Error Messages ....................................................30
More Useful Functions ...................................................................32
A−1: Working with Dates ....................................................................................33
A−2: Working with Text........................................................................................35
A−3: Using the IF Function ...............................................................................38
A−4: Using the PMT Function...........................................................................39
A−5: Count Functions .........................................................................................40
1
Introduction to Formulas
Excel: Functions
3
Save For Later
Formulas begin with an equal sign ( = ). The equal sign prevents Excel
from interpreting the formula as text, since cell addresses begin with
letters. The formula then includes the values to be calculated with
appropriate mathematical operators placed in between. For example, to
add the values in cells A1 and A2, you would type the formula =A1+A2.
Excel: Functions
4
Save For Later
Order of Operations
Excel calculates a formula from left to right. When more than one
mathematical operator appears in a formula, Excel calculates according
to the standard mathematical order of operations. This order determines
which operations are carried out first.
Parentheses
To change the order of evaluation, enclose in parentheses the part of the
formula to be calculated first. If the outcome of the equation is not
changed by rearranging the parentheses, the law of associativity holds.
For example:
=6+4-8
The solution to this formula is 2.
=(6+4)-8
If parentheses are added or rearranged, the outcome
OR
is still the same.
=6+(4-8)
This is not true for all equations. In some equations the law of associativity
does not hold. That is, the location of parentheses can changes the
outcome of the formulas. For example:
Excel: Functions
5
Save For Later
Examples of Formulas
When you enter a formula in a cell, you can either type the cell addresses
or use the mouse to select the cells and allow Excel to enter the cell
addresses into the formula automatically.
The steps for entering a formula are outlined below:
1. Click the cell in which you want the result of the formula to appear.
2. Type the equal sign [ =].
3. Enter the appropriate constant value sand/or cell references along
with the mathematical symbol(s) for performing your calculation(s).
4. Press[Enter].
Formulas are entered in the cell where you want the result to appear.
Once the formula has been entered:
· The result will be displayed in the current cell
· The formula will be displayed in the Formula bar
Excel: Functions
6
Save For Later
You can also enter a formula in a cell by selecting the cell, and typing the
formula directly into the Formula bar.
You will find that you cannot see the true contents of a cell containing a formula
just by looking at it. what you see in the cell is the result based on the formula
entered In order to view the formula, you must select the cell in which it is stored
and then view the formula contents in the Formula bar.
Excel: Functions
7
Save For Later
In this activity you will practice associativity, using parentheses, and the
order of operations with constants. Create the following formulas either
by typing directly in a cell or into the formula bar. Use the worksheet
entitled “Constants.”
Nested Parentheses
2.(4*(10+8))/3
3.(4*10)+(8/3)
4.4*((10+8)/3))
Excel: Functions
8
Save For Later
Excel uses the A1 reference style, which refers to columns with letters and
refers to rows with numbers. These letters and numbers are called row
and column headings. To refer to a cell, enter the column letter followed
by the row number. For example, “B2” refers to the cell at the intersection
of column B and row 2.
· Formulas containing constant values will produce a result that will never
change. The formula “=3*4” produces the result “12”.
You have enrolled in two courses this semester. You want to track your
course expenses in an Excel worksheet. In the worksheet “Courses,” create
a formula in cell C5 that adds the cost of the three Writing Creative
Nonfiction textbooks in cells C2, C3, and C4.
Excel: Functions
9
Save For Later
The key to the point method is to point and click the cells to be included
and to type the operators where appropriate. The following example
provides instructions for a simple addition of two cells “=cell1+cell2”
using the point method.
1. Click the cell in which you want to enter the formula.
2. To start the formula, press [ = ].
3. Point and click on the first cell to be added.
4. Press [ + ].
5. Point and click on the second cell to be added.
6. Press [Enter].
Instead of pressing [Enter] to complete formulas in Excel, you can click the
check mark in the Formula bar [ ].
Now you will write a formula to subtotal the text book expenses for the
Techniques of Successful Writing course. In the “Courses” worksheet, write a
formula in cell C10 that adds together the textbooks in cells C8 and C9. Use
the pointing method to select the cells.
Excel: Functions
10
Save For Later
You may want to use the value from a cell in another worksheet within
the same workbook in a formula. In the following example, the Average
worksheet function calculates the average value for the range B1:B10 on
the worksheet named Marketing in the same workbook. Note that the
name of the worksheet and an exclamation point precede the cell
reference.
When the source is open, the link includes the workbook name in square
brackets, followed by the worksheet name, an exclamation point ( ! ), and
the cells that the formula depends on. For example, the following formula
adds the cells C10:C25 from the workbook named Budget.xls.
=SUM([Budget.xls]Annual!C10:C25)
When the source is not open, the link includes the entire path.
=SUM('C:\Reports[Budget.xls]Annual'!C10:C25)
=SUM(Budget!Sales)
Excel: Functions
11
Save For Later
2
Introduction to Functions
Excel: Functions
12
Save For Later
Excel provides over 200 built−in formulas called functions. You can use a
function by itself or in conjunction with other formulas or functions. Some
of the most commonly used functions are described in the table below:
Excel: Functions
13
Save For Later
One of the most commonly used functions in Excel is the SUM function,
which calculates the total of the values in a range of cells. Using this
function is easier than typing a formula and each individual cell address.
When you click the AutoSum button, a suggested range for the function
is selected. This suggested range can be changed. If you click the
AutoSum button at the end of a row, the row of values to the left of the
active cell is selected. If you click the AutoSum button at the bottom of a
column, the column of values above the active cell is selected. If there
are values both above and to the left of the active cell, the column of
values above the active cell is selected.
You can also use AutoSum, by first selecting the cells you want to add
together then clicking the AutoSum button. This will put the answer in an
empty cell right following the selected cells.
Excel’s AutoSum feature allows you to quickly create sums, and other
functions, without typing any function syntax.
Other common functions, such as Average, Min, and Max are also
available from the AutoSum button.
Excel: Functions
14
Save For Later
Excel: Functions
14
Save For Later
2. For each of the utilities listed, find the total spent for the year using
AutoSum.
3. Once you have found the total for each of utilities, using AutoSum find
out how much you spent in total on utilities for the whole year.
Excel: Functions
15
Save For Later
There are multiple ways you can create a function. You can insert
functions manually (by typing them), or you can select from available
functions using the Insert Function dialog box or the Functions List.
1. Click the cell in which you want to display the results of the function.
2. Press [ = ].
3. Enter the Function Name into the cell by one of the methods
described in the table below.
4. Select or enter the Function Arguments (cell references to be used in
the calculation enclosed in parentheses).
5. Press [Enter].
Excel: Functions
16
Save For Later
To enter a function manually, you must first click in the cell in which you
want the function to be placed, then type the formula as described in
steps 1 through 6 below for each of the basic functions.
1. Press [ = ].
2. Type the function name [ sum, average, min, max, count ].
3. Press left parenthesis [ ( ].
4. Enter the reference to the cells you wish to use in the calculation.
· Press the colon [ : ] between the first and last cells in a range.
· Press comma [ , ] if you are listing cells.
5. Press right parenthesis [ ) ].
6. Press [ Enter ]. Excel will calculate and enter the result in the cell.
For example, in Figure 2−1 below, Excel calculates the sum of the range of
cells beginning with cell A3 and ending with cell D3. In Figure 2−2 below,
Excel calculates the average of cells H13 and H15.
Instead of typing the cell reference, click and select the range of
cells you wish to calculate. Excel will enter the cell reference for you
in the formula.
Excel: Functions
17
Save For Later
· Click and highlight the range of cells you want results for.
· By default, average, count, and sum appear in the Status bar.
Excel: Functions
18
Save For Later
Excel: Functions
18
Save For Later
If you are not sure of the proper syntax of a formula, or you need help
entering a formula, select a formula from the Functions library on the
Formulas tab.
Excel: Functions
19
Save For Later
Once you choose a function, the Function Arguments dialog box (Figure
2−7) will open, providing you with a text box into which you can insert the
cell range for the formula. Note that the fields in the dialog box will vary
based on the function you select. Click the Collapse button after each
field to select the cells to include in your function. Once you have
selected your cells, click the to return to the dialog box.
Note that certain function, for examples SUM, may not open up
the Functions Arguments dialog box. instead they will try to guess
which cells you want in the formula and select them for you
automatically. You can adjust the selection of needed.
Excel: Functions
20
Save For Later
Your best friend has heard you speaking with pride and
excitement about the Excel worksheets you have created to
maintain your personal expenses. He has asked that you help him
create a few formulas in one of his company sales worksheets to
calculate the highest and lowest sales totals for the first and
second quarters.
In this activity, you will calculate the highest sales totals reported
for Quarters 1 and 2 at Benjamin of Brussels Company.
Excel: Functions
21
Save For Later
3
Working with Formulas
Excel: Functions
22
Save For Later
By default, new formulas use relative references. For example, if you copy
a relative reference in cell B2 to cell B3, it automatically adjusts from =A1
to =A2.
Absolute Referencing
An absolute cell reference in a formula, such as $A$1, always refer to a
cell in a specific location. If the position of the cell that contains the
formula changes, the absolute reference remains the same. If you copy
the formula across rows or down columns, the absolute reference does
not adjust.
To create an absolute reference, place dollar signs "$" within the cell
addresses in the formula. For example:
Excel: Functions
23
Save For Later
By default, new formulas use relative references. If you want them to use
absolute referencing, you will need to change them manually. For
example, if you copy an absolute reference in cell B2 to cell B3, it stays
the same in both cells =$A$1.
You can quickly and easily copy formulas into adjacent cells by using the
AutoFill Handle (the small black square in the lower−right corner of the
selection.
To copy a formula using AutoFill:
1. Click anywhere inside the cell that you want to copy to select it.
2. Rest the mouse pointer on the Fill Handle at the lower−right corner
of the selected cell.
3. The mouse pointer will change to a solid cross.
4. Once the pointer has changed to a solid cross, click and hold the
mouse button down and drag the Fill Handle to the adjoining cell(s)
that you want to copy into.
5. Release the mouse button. Excel fills the cell(s) with the copied
formula using relative referencing.
Excel: Functions
24
Save For Later
[ Ctrl ] + [C]
Keyboard [ Ctrl ] + [V]
Your best friend is so happy with the work you did on his Benjamin of
Brussels Excel worksheet. He wonders if it would be a lot of trouble for you
to calculate the remaining highest sales totals for Quarters 3 and 4.
In this activity, you will use AutoFill to quickly calculate the highest sales
totals reported for Quarters 3 and 4 at Benjamin of Brussels Company.
Excel: Functions
25
Save For Later
After entering formulas in your worksheet, you may find that you need to
make some changes to them. When you enter or edit a formula in Excel,
cell references and the borders around the corresponding cells are
color−coded to guide you (Figure 3−7).
3. Press [ Enter ].
Deleting Formulas
To delete a formula:
Excel: Functions
26
Save For Later
A smart tag appears when you create a formula which Excel believes
may be incorrect. The notification comes to you in the form of a green
triangle in the corner of the cell that may contain the error. When you
select the cell, the Error Checking button appears. Hover your mouse over
the button to display a tool tip that describes the possible problem. Click
the drop−down arrow next to the Error Checking button to display a list of
options available to correct the potential problem.
Excel: Functions
27
Save For Later
Appendi
x
Excel: Functions
28
Save For Later
Syntax:
DATE(year,month,day)
Year The year argument can be one to four digits. Microsoft Excel
interprets the year argument according to the date system you
are using. By default, Excel for Windows uses the 1900 date
system; Excel for the Mac uses the 1904 date system.
Excel offers a variety of different ways to include dates and times into
your worksheets. Static and dynamic are two types of dates and times.
Static dates and times will not change but dynamic dates and times will
change as time progresses. Nevertheless, both static and dynamic dates
and times are useful.
Excel: Functions
29
Save For Later
The current date appears in the cell and will be updated every time Excel
recalculates.
Static dates are not updated. The date that is inserted into the cell is the
date immediately after the command is entered into the cell. This can be
used to enter the date when the worksheet has been created.
The current date appears in the cell and will not be updated.
Excel: Functions
30
Save For Later
Syntax:
Examples:
TRIM Function
TRIM function returns a text value with the leading and trailing spaces
removed.
Syntax: TRIM(text)
where text is the text value to remove the leading and trailing spaces
from.
Examples:
Excel: Functions
31
Save For Later
Example:
Paste Special
Often when using functions to clean up data, you want the results
of the function to replace the original range of data. Remember in
the example below, cell B2 actually holds the function:
=Proper(A1) and not the result: Joe Smith. If you were to delete
column A, the function would no longer work.
Excel: Functions
32
Save For Later
CONCATENATE Function
Syntax:
CONCATENATE (text1,text2,...)
Text1, text2, ... are 1 to 30 text items to be joined into a single text
item. The text items can be text strings, numbers, or single−cell
references.
Excel: Functions
33
Save For Later
Syntax:
IF(logical_test,value_if_true,value_if_false)
Logical_test is any value or expression that can be evaluated
to TRUE or FALSE. For example, A10=100 is a logical expression; if
the value in cell A10 is equal to 100, the expression evaluates to
TRUE. Otherwise, the expression evaluates to FALSE.
Excel: Functions
34
Save For Later
The PMT Function calculates the payment for a loan based on constant
payments and a constant interest rate.
Syntax:
PMT(rate,nper,pv,fv,type)
Rate is the interest rate per period for the loan. (For example,
use 6%/4 for quarterly payments at 6% APR.
Excel: Functions
35
Save For Later
Syntax:
=COUNT(range)
=COUNTA(range)
Grading example:
COUNT is useful if you have a large class and want to determine
how many students have turned in a particular assignment.
COUNTBLANK
=COUNTBLANK(range)
COUNTIF
Syntax:
Counts the number of cells that are the same as a particular search
string.
=COUNTIF(range, “string”)
Example:
= COUNTIF(range, “A−”)
=COUNTIF(range, “A”)
=COUNTIF(range, “B+”)
Excel: Functions
36
Kickstart Your Data
Analytics Journey Today!
Internship Program : Get real-world experience through hands-on
projects, preparing you for the professional world.
Mentorship Program : Learn to upskill effectively with expert
guidance and personalized self-learning strategies
Job Assistance Program : Connect with top employers and gain the
tools to confidently secure your dream job.