2. 2.) Logical Functions
LEARNING OBJECTIVES 1
2
3.) Financial Functions
4.) Lookup Functions
THIS COURSE
IS DESIGNED
TO ACQUAINT
PARTICIPANTS
AS FOLLOWS
1.) Basic Excel Refresh and Designing Better
Spreadsheet
5.) Advanced Sorting and Filtering
6.) Data Validation
3. 8.) Working with Date and Time Series, Sales
Forecasting
LEARNING OBJECTIVES 2
3
9.) Formula Auditing
10.) Solver
THIS COURSE
IS DESIGNED
TO ACQUAINT
PARTICIPANTS
AS FOLLOWS
7.) Data Consolidation and Data Modeling
.11.) Preparing Data for Analysis
12.) Pivot Tables, Pivot Charts, Slicers and
Timers
6. LECTURE 1 OBJECTIVES
• How To Enter Data
• How To Navigate Through Excel Sheet
• How To Create Formulae To Solve
Problems
• How To Use Charts and Graphs
• How To Reference Data Using Relative
Reference and Absolute Reference
• Improving readability using Cell Styles,
• Controlling Cell Data input using Data
Validation and Cell Protection
• Adding Navigation buttons
7. How To Enter Data 1
• Select a cell with a single click where you want to enter data;
cell B3 is selected in the image given below. Then double click
in the cell to enter data. You can enter text, numbers and
formulas in the cell.
• After entering data, you can press Tab key to move to next
column and can press Enter key to move to next row. You can
press arrow keys for more options to move to other cells.
7
9. How To Navigate Through Excel Sheet 1
There are multiple options to move across the worksheet using
mouse and keyboard.
You can scroll the work sheet up or down by rolling mouse wheel
or using vertical scroll bar. In a similar way, you can use
horizontal scroll bar to move the work sheet horizontally towards
left or right side.
9
11. What is the Formula in Excel?
• An Excel formula is nothing but an introductory statement
consisting of one or more 'operands' and 'operators'. The
formulas in Excel help us specify the relationship between the
values recorded within the cells in the worksheet, perform
mathematical calculations on the recorded values, and retrieve
the desired results in a resultant cell.
• One essential point to note while using the formulas in Excel is
that we must always start them with an equal sign (=). If we
don't start the formulas with an equal sign, they are not treated
as formulas but only as a text string.
11
12. The Difference between a Formula and
Function
• An Excel formula is a statement or an equation structured
manually by a user to perform any calculation. At the same time,
the Excel function is the pre-defined calculation in the
spreadsheet program. We can use more than one function in a
formula.
• Example of Formula: =A1+A2+A3
• Example of Function: =SUM(A1:A3)
12
13. How To Create Formulae To Solve Problems
• There are several methods we can use to create formulas in
Excel. We discuss the most common methods below, and each
method has its advantages. All of the following methods for
creating formulas work in all versions of Excel.
• Creating Formulas using Constants and Operators
• Creating Formulas using Cell References
• Creating Formulas using the Pre-defined Functions
13
14. Creating Formulas using Constants and
Operators 1
• When creating formulas in Excel, constants are numbers, dates, or text values involved within the
formula. In addition, the operators are any sign, symbol, or character that refers to an action or operation
to be performed. The most common arithmetic operations include addition, subtraction, multiplication,
division, exponentiation, and modulus operations.
• To create a basic Excel formula in an Excel cell using the constants and operators, we must perform the
steps below:
• First, we need to select a cell to record the output or result.
• Next, we must type an equal symbol (=) and enter the formula equation to perform the calculation.
• Lastly, we must press the Enter key on the keyboard to obtain the results.
• Creating an Excel formula using constants and operators is different from writing an equation in maths.
The fundamental difference is that we start the formula with an equal sign in Excel, while in mathematics,
we usually insert an equal sign at the end.
• For example, if we want to add two numbers (3 and 5), an Excel formula will look like =3+5. However, in
maths, we use 3 + 5 =. When we insert an Excel formula in an Excel cell and press the Enter key, the
result of the formula appears like the following image:
14
16. Creating Formulas using Cell References 1
• Instead of typing the numbers directly into the Formula equation, we can also refer to the corresponding
cells that contain the required numbers (or values) in the sheet. It is more convenient and easier to use
cell references in formulas when working with large data sets. Furthermore, one advantage of using a cell
reference is that the formula results are automatically updated in real time whenever we change the value
in the corresponding cell/range.
• To create a formula using the cell references, we can perform the below steps:
• First, we need to select a cell to record the output.
• Next, we enter the equal sign (=). After that, we need to type the first cell that contains the number. It is
not mandatory to always type the cell reference. Instead, we can also click on the specific cell, and Excel
will automatically fetch the cell reference of that cell in the applied formula. This eliminates human error.
• In the next step, we must type the operator sign we want to apply for the formula. For example, if we want
to sum up the first and second cell values, we must use the addition sign (+) between them.
• After entering the operator sign, we need to type the cell reference of another number that we want to
include in our formula.
• Lastly, we must press the Enter key to obtain the formula result.
• Suppose our example sheet contains two numbers, 3 and 5, in the cells A1 and B1. We need to calculate
the sum of these values in cell C1 using the formula containing cell references. So, we have to apply the
following formula in a cell C1:
• =A1+B1
• After we press the Enter key, the result will appear in a cell C1, as shown below
16
17. Creating Formulas using Cell References 2
17
If the values are recorded in more than two cells, we can use the
cell reference of each cell similarly. For example, if we have
values in cells A1, B1, and C1, we can add their corresponding
values using the formula =A1+B1+C1. However, if several cells
are required in a formula, it is better to try using existing functions
18. Creating Formulas using the Pre-defined
Functions 1
• When there are multiple cells to use in the formula, and if they are
contiguous, it is even better to use the entire range than to use each cell
reference separately. Using the range in Excel helps us save time and get
the desired results more accurately. Additionally, we can also use the cell
references in formulas when combining the equation through functions.
• No matter the function name, the formula still begins with an equal sign
followed by the function name and the required arguments enclosed within
the parenthesis. However, each function has a different syntax structure
and requires specific arguments. We must know the syntax, necessary
arguments, and the order of the function we want to use
• When creating a formula by combining the existing Excel functions, we
usually have two common ways. We can either use the function wizard to
select the desired function (s) in our formula or directly type/ write the
entire formula with the functions into a cell or formula bar. Let us discuss
both the ways of creating formulas in Excel:
18
19. Creating Formulas using the Pre-defined
Functions 2
19
First, we need to select a resultant cell by clicking on it and running the Excel function wizard. We need to
navigate the Formulas tab and click on the 'Insert Function' button under the 'Function Library' section, which
will launch the 'Insert Function' window.
Alternatively, we can also use the 'fx' button from the left side of the formula bar to insert the desired function
in a cell.
20. Creating Formulas using the Pre-defined
Functions 3
Another quick way to insert a function in Excel involves using the function drop-down list.
After selecting the cell, we must type an equal sign (=) and choose the function from the
drop-down list present to the left of the formula bar.
In the Insert Function window, we typically get the three options using which we have to find
and select the desired function. We have to type the function name in the first option box
and click on the Go button. Additionally, we can type the desired function's description or
operation and click 'Go' to find relevant function names. However, it is not such a
convenient option if we don't know the appropriate name of the function.
20
21. Creating Formulas using the Pre-defined
Functions 4
21
When we are not sure of the function's name, we must manually select the category to
which our function may belong. The list has about 14-16 different categories, and all the
existing Excel functions are divided into them accordingly
22. Creating Formulas using the Pre-defined
Functions 5
22
After selecting the category of the desired function, we will see a list of various
functions under the section 'Select a function'. We need to find the desired function
in the list, and we can select the function in the list to get more information about it.
Excel will display the information or description with the syntax of that particular
function we selected.
23. Creating Formulas using the Pre-defined
Functions 6
23
• Once the function name is found, we must click the OK button. This will launch the
'Function Arguments' window, where we need to pass the desired or required arguments/
parameters for the function. When entering the arguments for any function, Excel shows
all the required information in the window. We can type the cell (s) or a range manually in
the respective boxes or use the selection box icon from the end of the box to select the
cells in the sheet using mouse clicks
24. Creating Formulas using the Pre-defined
Functions 7
24
In the above image, we can see that the result also appears at the bottom of the
window after we pass/ select the desired arguments for the function.
Lastly, we must click the OK button or press the Enter key on the keyboard to complete
the formula and retrieve the corresponding formula result in a selected resultant cell.
25. Creating Formulas using the Pre-defined
Functions
25
Also Typing/ Writing a formula into a Cell or formula bar directly
It seems a lengthy process, although it is easy to create Excel formulas using
the Function Wizard. If we have knowledge about the Excel function we want to
use, a faster way would be to type it directly into the cell or formula bar and pass
the corresponding arguments according to the formula syntax.
26. Creating Formulas using the Pre-defined
Functions
26
• As usual, we first have to select a cell to record an output value. Next, we must enter the
equal sign (=) followed by the desired function name. When we start typing the function
name into an Excel cell, a list with the relevant function names appears in front of us. We
can also select the desired function from the list by pressing the TAB key on that
particular function. When we write the function name manually, we must manually type
the starting parenthesis sign. However, a starting parenthesis is automatically inserted
when selecting a function from the list by pressing the TAB key.
27. Creating Formulas using the Pre-defined
Functions
27
As soon as we write/ select the function name, Excel automatically shows the syntax for that
function, highlighting the arguments required for the function. We can type the cell reference or a
range manually or click on the specific cells/range to include them in our formula.
For example, the following image shows the formula to calculate the average price for the recorded
values in cells from B2 to B5.
Lastly, we must type the closing parenthesis and press the Enter key to get the final results.
28. How To Use Charts and Graphs
• It is sometimes difficult to interpret the Excel data due to
complexity and size of data. So, charts are a way to represent
the data graphically and interpret the data easily. Charts are the
visual representation of data.
• Excel provides charts to take advantage of graphical
representation. The data represented through charts is more
understandable than the data stored in an Excel table. This
makes the process of analyzing data fast. Excel users can fast
analyze the data.
• Graphical representation of data using charts makes complex
data analysis easier to understand. Excel has a variety of
charts, each with its own different functionality and
representation style. 28
29. Charts offered by Excel
• Excel offers many charts to represent the data in different manners, such as - Pie
charts, Bar charts, Line charts, Stock charts, Surface charts, Radar charts, and
many more. You can use them according to your data and analysis. All these
charts
• There is a list of basic and advanced level of charts used for different purposes to
interpret the data.
1.Column Chart
2.Line Chart
3.Bar Chart
4.Area chart
5.Pie chart or Doughnut chart
6.Surface chart
A large dataset is not easy to represent using other charts. Surface chart solve this
problem that allows displaying large datasets using this 3D chart.
29
31. Choose your charts wisely
• Excel offers too many charts as well as their 2D and 3D type.
You can use any of them but choose them wisely according to
your data. Different scenario requires different charts. Though, it
can display all and correct information.
• We have a list of some points for each type of chart that helps
you to choose the chart wisely. Read them carefully -
31
32. Chart Type and When to choose this chart
32
• 1. Column Chart Use the column chart when you want to compare the
multiple values across a few categories. The values are shown through vertical
bars.
• 2. Line Chart Choose this chart when you want to show the treads (ups
and downs) over a period of time, like for months or years.
• 3. Bar Chart Like the column chart, use this chart to compare the values
across a few categories.
• In this chart, values are displayed in the horizontal bar.
• 4. Area chart Area chart has the same pattern as the line chart. This chart
is best to use for indicating a change among different sets.
• 5. Pie or Doughnut chartPie chart is best to use when you want to quantify the
values and show them as percentage.
• 6. Surface chart Surface chart is different than other charts. Use it when you
need to analyze the optimum combination between two sets of data
33. How to insert a chart?
• Excel enables easy to use user interface using which you can easily insert a required
chart for your data. You need to follow few simple steps, Excel > Insert tab > Chart section
> choose a chart.
• We will illustrate these steps from start to end for creating the chart for Excel data.
Following are the steps to insert a chart in Excel.
• Step 1: We have the following dataset (Animal population rate for six years from 2015-
2020) for which you want to create a chart in Excel
33
34. How to insert a chart?
Step 2: Select the data, including column header and row label
for which you want to create a chart. This data will be the source
data for your chart.
34
35. How to insert a chart?
Step 3: Navigate to the Insert tab in the Excel header, where you
will see a charts section that contains a list of all these charts.
35
36. How to insert a chart?
Step 4: Choose a chart from here according to your data. We
have chosen a 3D Column chart containing vertical bars for your
data.
36
37. How to insert a chart?
Step 5: The selected chart is inserted into your Excel worksheet.
Initially, the chart looks like this for the data selected in step 2..
37
38. How To Reference Data Using Relative
Reference and Absolute Reference
MS Excel or Microsoft Excel is powerful spreadsheet software
developed by Microsoft. Each worksheet in Excel consists of several
cells formed by rows and columns. Each cell has a specific reference
(or cell reference) which helps the users easily access/address the
desired cell (s) within the functions. Cell references play an important
role in Excel, especially when using functions and formulas with large
data sets
• What is a cell reference?
• A cell reference refers to the name or address of a specific cell or
range of cells within the spreadsheet. A cell reference is commonly
used as a variable in Excel formulas. While representing the cell
reference in Excel, we need to specify the column name followed by
the row number of the respective cell.
38
39. How To Reference Data Using Relative
Reference and Absolute Reference
The following image displays the cell reference of the selected
cell in an Excel sheet:
39
40. How many types of cell references are there in
Excel?
• Understanding different types of cell references mainly help us
to work with Excel formulas easily, thereby preventing
unexpected formula errors. This is most helpful when copy-
pasting Excel formulas. There are three primary types of cell
references in Excel based on different use cases, such as:
• Relative Cell Reference
• Absolute Cell Reference
• Mixed Cell Reference
• Let us discuss each type of cell reference in detail:
40
41. Important Points to Remember about cell
references in Excel?
• Important Points to Remember
• The cell reference is one of the key elements for Excel functions or
formulas.
• The cell references can be used with functions, formulas, charts, and
many other essential commands present in Excel.
• When relative cell references are used in Excel formulas, the
references are adjusted automatically as per the corresponding row
and column.
• It is recommended to use absolute cell references when copying
formulas in cells that are non-relative. The absolute cell references
do not change by Excel.
• Mixed reference locks only one of the references, either row or
column, as per requirements. It does not lock both.
41
42. Improving readability using Cell Styles,
• Consider an Excel sheet that has data of different types and formats. The
data might be downloaded, inserted, or circulated between users one after
the other. In those cases, each data might have different formatting
depending on the user settings. This will make the data unpleasant to look
at and hinders its readability.
• You would then want to modify and organize the data in a well-formatted
and orderly fashion. You can select each cell or cell range and modify the
look and format of the cell manually. However, this task can be a little
daunting and time-consuming.
• Here, using the Cell Styles option in Excel you can easily modify the
formatting and profile of the cell and its contents with the click of a button.
• In this article, I will show you how to apply built-in styles, create custom
styles, and remove the cell styles in Excel when not necessary.
42
43. Improving readability using Cell Styles,
• Cell Styles have similar characteristics to Conditional Formatting. In Conditional
Formatting, the format of the cells is changed when specific conditions or criteria
are met. Whereas, Cell Styles are static i.e. you can change the cell styles
whenever you want based on your needs.
• The cell styles option will be very useful when you have to change the style
formatting of a group of cells altogether instead of changing them one by one.
You can create a particular cell style by including all the cell format aspects like
font color, size, font style, fill, borders, etc., and then use them whenever
needed.
• Using the built-in or custom-created cell styles will make all the cells look more
consistent and give a professional finish to the data, thereby making it easier to
read.
• There are a variety of options available when it comes to cell styling in Excel. You
can do the following:
• Apply the Built-In Cell Styles in Excel
• Create a Custom Cell Style
• Copy and Duplicate an Existing Cell Style
• Modify an Existing Cell Style
• Remove the Cell Style from the Cells
• Delete a Cell Style
• In this guide, I will explain how to use Cell Styles with an example
44. Improving readability using Cell Styles,
• Consider an example, where you have a consolidated list of sales made by an automobile company in 11
years.
• When you enter the data onto an Excel sheet, the formatting will be different for numbers and texts. Also,
there is no distinction or highlights to show the differentiation of data. You can now use the Cell Styles to
format the cells and their contents.
•
45. Controlling Cell Data input using Data
Validation and Cell Protection
• What is data validation in Excel?
• Excel Data Validation is a feature that restricts (validates) user input to a
worksheet. Technically, you create a validation rule that controls what kind
of data can be entered into a certain cell.
• Here are just a few examples of what Excel's data validation can do:
• Allow only numeric or text values in a cell.
• Allow only numbers within a specified range.
• Allow data entries of a specific length.
• Restrict dates and times outside a given range.
• Restrict entries to a selection from a drop-down list.
• Validate an entry based on another cell.
• Show an input message when the user selects a cell.
• Show a warning message when incorrect data has been entered.
• Find incorrect entries in validated cells.
46. Controlling Cell Data input using Data
Validation and Cell Protection
For instance, you can set up a rule that limits data entry to 4-digit numbers between 1000 and 9999. If the user
types something different, Excel will show an error alert explaining what they have done wrong:
47. Adding Navigation buttons
• Click Insert > Shapes > Rounded Rectangle. See screen shot
2. Draw a rounded rectangle on the worksheet, and you can
format it and type text to it as you need. In our case, we type Go
To Sheet1 as below screen shot shown
47
48. Adding Navigation buttons
3. Right click the rounded
rectangle, and select
Hyperlink from the
right-clicking menu.
48
49. Adding Navigation buttons
4. In the opening Insert Hyperlink dialog box,
(1) Select Place in This Document in the Link to section;
(2) Click to select the certain sheet name in the Or Select a place in this document section;
(3) Type the destination cell address into the Type the cell reference box, and at last click
the OK button
49
53. LECTURE 2 OBJECTIVES
•Understanding Logical Functions
•Using IF with text
•Using IF with numbers
•Nesting IF Functions
•Using IF Error
•Using AND, OR, NOT
•Using SUMIF, COUNTIF,COUNTIFS,
COUNTIFS, AverageIF
•Using IFNA, IFERROR
55. Excel IF Function
www.prolearninghub.com
Purpose
Test for a specific condition
Return value
The values you supply for TRUE or FALSE
Syntax
=IF (logical_test, [value_if_true], [value_if_false])
Arguments
logical_test - A value or logical expression that can be evaluated as
TRUE or FALSE.
value_if_true - [optional] The value to return when logical_test
evaluates to TRUE.
value_if_false - [optional] The value to return when logical_test
evaluates to FALSE.
56. Excel IF Function
www.prolearninghub.com
Usage notes
Use the IF function to test for or evaluate certain conditions, and
then react differently depending on whether the test was TRUE or
FALSE.
For example, let's say you want to assign either "Pass" or "Fail" to
students based on a test score. In that case, you need to test the
sore itself (for each student) and then return either "Pass" or "Fail".
If you had a score in cell C6, and you wanted to test this score to see
if is at least 70, you would use this:
C6>=70
57. Excel IF Function
www.prolearninghub.com
This translates as "C6 contains a value greater than or equal
to 70". It will either be TRUE or FALSE, depending on the
value in C6. You then supply a value that the IF function
should return if the test is TRUE, and a value to use if the
test is FALSE.
Putting it all together, you would use this formula:
=IF(C6>=70, "Pass", "Fail")
This is the formula that appears D6 in the example shown.
When it is copied down the column, it will test every score
and return the correct result.
58. Excel IF Function
www.prolearninghub.com
Nested IF statements
You may here the term "Nested IF" or "Nested IF
statement". This refers to using more than one IF function
so that you can test for more conditions and return more
possible results. Each IF statement needs to be carefully
"nested" inside another so that the logic is correct.
For example, the following formula can be used to assign an
grade rather than a pass / fail result:
=IF(C6<70,"F",IF(C6<75,"D",IF(C6<85,"C",IF(C6<95,"B","A")
)))
59. Excel IF Function
www.prolearninghub.com
Up to 64 IF functions can be nested.
However, in general, you should
consider other functions, like
VLOOKUP or HLOOKUP for more
complex scenarios, because they
can handle more conditions in much
more streamlined fashion.
Logical operators
When you are constructing a test
with IF, you can use any of the
following logical operators:
Comparison
operator
Meaning Example
= equal to A1=D1
> greater than A1>D1
>=
greater than or
equal to
A1>=D1
< less than
A1<d1<
td=""></d1<>
<=
less than or equal
to
A1<=D1
<> not equal to A1<>D1
60. Excel IF Function
www.prolearninghub.com
Notes:
If any of the arguments to IF are supplied as arrays, the IF
function will evaluate every element of the array.
To count things conditionally, use the COUNTIF or
the COUNTIFSfunctions.
To sum things conditionally, use the SUMIF or
the SUMIFS functions.
63. Excel IFERROR Function
www.prolearninghub.com
Purpose
Trap and handle errors
Return value
The value you specify for error conditions.
Syntax
=IFERROR (value, value_if_error)
Arguments
value - The value, reference, or formula to check for an error.
value_if_error - The value to return if an error is found.
64. Excel IFERROR Function
www.prolearninghub.com
Usage notes
Use the IFERROR function to trap and handle errors produced
by other formulas or functions. IFERROR checks for the
following errors: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!,
#NAME?, or #NULL!.
For example, if A1 contains 10, B1 is blank, and C1 contains the
formula =A1/B1, the following formula will trap the #DIV/0!
error that results from dividing A1 by B1:
=IFERROR (A1/B1. "Please enter a value in B1")
In this case, C1 will display the message "Please enter a value in
B1" if B1 is blank or zero.
65. Excel IFERROR Function
www.prolearninghub.com
Notes:
If value is empty, it is evaluated as an empty string ("")
and not an error.
If value_if_error is supplied as an empty string (""), no
message is displayed when an error is detected.
If IFERROR is entered as an array formula, it returns an
array of results with one item for each cell in value.
68. Excel IFS Function
www.prolearninghub.com
Purpose
Test multiple conditions, return first true
Return value
Value corresponding with first TRUE result
Syntax
=IFS (test1, value1, [test2, value2], ...)
Arguments
test1 - First logical test.
value1 - Result when test1 is TRUE.
test2, value2 - [optional] Second test/value pair.
69. Excel IFS Function
www.prolearninghub.com
Usage notes
Use the IFS function to test multiple conditions and return a
value corresponding to the first TRUE result. Unlike the IF
function, IFS allows you to test more than one condition
without nesting. This makes formulas with many conditions
easier to read.
Arguments are entered in test/value pairs. Each test (condition)
represents a logical test that returns TRUE or FALSE, and each
value is associated with the previous test. A value is returned
by IFS only when its test returns TRUE, and the first test with a
TRUE result "wins". The IFS function supports up to 127
conditions.
70. Excel IFS Function
www.prolearninghub.com
In the example shown the formula in E5 is:
=IFS(D5<60,"F",D5<70,"D",D5<80,"C",D5<90,"B",D5>=90,"A")
Note: the IFS function is new in Excel 2016 on Windows, and won't work
in other versions of Excel.
Notes:
There is no way to set a default if all tests return FALSE (i.e. a value if
false). Instead, enter TRUE for the last test, and then a value to return as
a default value if FALSE.
All logical tests must return TRUE or FALSE. Other results will case IFS to
return a #VALUE! error.
If no logical tests return TRUE, IFS returns the #N/A error.
73. Excel NOT Function
www.prolearninghub.com
Purpose
Reverse arguments or results
Return value
A reversed logical value
Syntax
=NOT (logical)
Arguments
logical - A value or logical expression that can be evaluated as TRUE or
FALSE.
Usage notes
Use the NOT function to reverse a value or logical argument, that is,
if logical is FALSE, NOT returns TRUE. If logical is TRUE, NOT returns
FALSE.
74. Excel NOT Function
www.prolearninghub.com
Why would you want to do this? A common example is to
reverse the behavior of another function. For example, If
the cell A1 is blank, then the formula =ISBLANK(A1) will
return TRUE. NOT can be used to reverse this result to
FALSE like this:
=NOT(ISBLANK(A1))
In essence, by adding NOT, you are able to create a
formula that behaves like ISNOTBLANK, which doesn't
exist in Excel.
76. Excel OR Function
www.prolearninghub.com
Purpose
Test multiple conditions with OR
Return value
TRUE if any arguments evaluate TRUE; FALSE if not.
Syntax
=OR (logical1, [logical2], ...)
Arguments
logical1 - The first condition or logical value to evaluate.
logical2 - [optional] The second condition or logical value
to evaluate.
77. Excel OR Function
www.prolearninghub.com
Usage notes
Use the OR function to test multiple conditions at the
same time, up to 255 conditions total.
For example, to test if the value in A1 OR the value in B1 is
greater than 75, use the following formula:
=OR(A1>75,B1<75)
OR can be used to extend the functionality of functions
like IF. Using the above example, you can supply OR as the
logical_test for an IF function like so:
=IF(OR(A1>75,B1<75), "Pass", "Fail")
78. Excel OR Function
www.prolearninghub.com
This formula will return "Pass" if the value in A1 is greater than 75
OR the value in B1 is greater than 75.
If you enter OR as an array formula, you can test all values in a range
against a condition. For example, this array formula will return TRUE
if any cell in A1:A100 is greater than 15:
={OR(A1:A100>15}
Notes:
Each logical condition must evaluate to TRUE or FALSE, or be arrays
or references that contain logical values.
Text values or empty cells supplied as arguments are ignored.
The OR function will return #VALUE if no logical values are found
81. Excel TRUE Function
www.prolearninghub.com
Purpose
Generate the logical value TRUE
Return value
The logical value TRUE
Syntax
=TRUE ()
Usage notes
The TRUE function is provided for compatibility with other
spreadsheet applications and there is no need to use it in almost all
cases.
82. Excel TRUE Function
www.prolearninghub.com
If you want to enter TRUE, or provide TRUE as a result in a formula,
you can just use enter the word TRUE directly into a cell or formula and
Excel will interpret this as the logical value TRUE. For example, these
formulas are functionally identical:
=IF(A1<0, TRUE()) =IF(A1<0, TRUE)
Also note that logical expressions themselves will automatically
generate TRUE and FALSE results. For example, the formula in cell C7 is:
=B7>90
This expression evaluates to TRUE, which is the result that appears in
the spreadsheet.
If you want to test a condition and return different results based on
whether the results are TRUE or FALSE, see the examples on this page.
85. Excel ADDRESS Function
www.prolearninghub.com
Purpose
Create a cell address from a given row and column
Return value
A cell address in the current or given worksheet.
Syntax
=ADDRESS (row_num, col_num, [abs_num], [a1], [sheet])
Arguments
row_num - The row number to use in the cell address.
col_num - The column number to use in the cell address.
abs_num - [optional] The address type (i.e. absolute, relative). Defaults to
absolute.
a1 - [optional] The reference style, A1 vs R1C1. Defaults to A1 style.
sheet - [optional] The name of the worksheet to use. Defaults to current
sheet.
86. Excel ADDRESS Function
www.prolearninghub.com
Usage notes
Use ADDRESS to create an address from a given row and
column number. For example, ADDRESS(1,1,) will return $A$1.
Abs_num key:
1 or omitted Absolute
2 Absolute row; relative column
3 Relative row; absolute column
4 Relative
88. Excel AREAS Function
www.prolearninghub.com
Purpose
Get the number of areas in a reference.
Return value
A number representing number of areas.
Syntax
=AREAS (reference)
Arguments
reference - A reference to a cell or range of cells.
Usage notes
Reference can include more than one reference. you must separate multiple
references with a comma and wrap then in an extra set of parentheses.
Otherwise, Excel will think the commas indicate multiple parameters and
generate an error.
As an example, the formula =AREAS((F17:F19,J16:J18,I8)) will return 3.
92. LECTURE 3 OBJECTIVES
•Understanding Financial Functions
•Future Value (FV): Financial Function
in Excel
•FVSCHEDULE: Financial Function in
Excel
•Present Value (PV): Financial
Function in Excel
•Net Present Value (NPV): Financial
Function in Excel
•XNPV: Financial Function in Excel
•PMT: Financial Function in Excel
•PPMT: Financial Function in Excel
93. LECTURE 3 OBJECTIVES Cont’d
•Rate of Return (IRR): Financial
Function in Excel
•Modified Internal Rate of Return
(MIRR): Financial Function in Excel
•XIRR: Financial Function in Excel
•NPER: Financial Function in Excel
•RATE: Financial Function in Excel
•EFFECT: Financial Function in Excel
•NOMINAL: Financial Function in Excel
•SLN: Financial Function in Excel
95. Future Value(FV) function
• Calculates the future value of an investment with periodic constant
payments and a constant interest rate
• Syntax-FV(rate, nper, pmt, pv, type)
96. Future Value(FV) function cont….
rate - The interest rate, per period.
nper - The number of periods for the lifetime of the annuity.
[pmt] - An optional argument that specifies the payment per period.
(Note that if the [pmt] argument is omitted, the [pv] argument
must be
supplied).
[pv] - An optional argument that specifies the present value of the
annuity -
i.e. the amount that a series of future payments is worth now.
(If the [pv] argument is omitted, it takes on the default value 0.
Also,
if [pv] is omitted, the [pmt] argument must be supplied).
[type] - An optional argument that defines whether the payment is
made at
the start or the end of the period.
The [type] argument can have the value 0 or 1, meaning:
0 - the payment is made at the end of the period;
97. Example 1
In the following spreadsheet, the Excel Fv function is used to calculate the
future value of an investment of $1,000 per month for a period of 5 years. The
present value is 0, the interest rate is 5% per year and the payments are
made at the end of each month.
Note that, in this example:
Syntax-FV(rate, nper, pmt, pv, type)
Rate=……………?
Nper=………….?
Pmt=……………?
Pv=……………..?
Type=………….?
Excel FV Function Examples
99. Example 2
In the example below, the Excel Fv function is used to calculate the
future value of an investment of $2,000 per quarter for a period of
4 years. The interest is 10% per year and each payment is made at
the start of the quarter
.
Rate=……………?
Nper=………….?
Pmt=……………?
Pv=……………..?
Type=…………..?
101. Net Present Value(NPV) Function
The Excel NPV function calculates the Net Present Value of an
investment, based on a supplied discount rate, and a series of
future payments and income.
The syntax of the function is:
NPV( rate, value1, [value2], [value3], ... )
102. rate - The discount rate over one period.
value1, [value2],
...
- Numeric values, representing a series
of regular payments and income,
where:
•Negative values are treated as
payments;
•Positive values are treated as income.
Net Present Value(NPV) Function cont....
103. Excel NPV Function Examples
Example 1
The spreadsheet on the right shows an example of the NPV
function.
The rate and value arguments that are supplied to the function are
shown in cells A1 - A7 of the spreadsheet and the NPV function is
shown in cell B10.
This function gives the result 196.88.
Note that, in this example, the initial investment of $5,000 (shown
in cell A2), is made at the end of the first period. Therefore, this
value is included as the first value1 argument to the NPV function.
NPV( rate, value1, [value2], [value3], ... )
104. Answer is…
A B
1 2% - Annual discount rate
2 -5000 - Initial investment cost after 1 year
3 800 - Return from year 1
4 950 - Return from year 2
5 1080 - Return from year 3
6 1220 - Return from year 4
7 1500 - Return from year 5
8
9 Net Present Value:
10
=NPV( A1, A2:A7 )
105. Example 2
The spreadsheet on the right shows an example of the NPV
function in which the first payment is made at the start of the first
period.
Again, the rate and value arguments of the investment are shown in
cells A1 - A7 of the spreadsheet and the NPV function is shown in
cell B10.
This function gives the result 2,678.68.
Note that, as the initial investment of $10,000 (shown in cell A2), is
made at the start of the first period, this value is not included in the
arguments to the NPV function. Instead it is added on afterwards.
106. Answer is…
A B
1 5% - Annual discount rate
2 -10000 - Initial investment cost at start of period 1
3 2000 - Return from year 1
4 2400 - Return from year 2
5 2900 - Return from year 3
6 3500 - Return from year 4
7 4100 - Return from year 5
8
9 Net Present Value:
10 =NPV( A1, A3:A7 ) + A2
107. The Excel PV function calculates the Present Value of an
investment, based on a series of future payments.
The syntax of the function is:
PV( rate, nper, [pmt], [fv], [type] )
Present Value(PV) function
108. Present Value(PV)function cont..
rate - The interest rate, per period.
nper - The number of periods for the lifetime of the annuity or
investment.
[pmt] - An optional argument that specifies the payment per
period.
If the [pmt] argument is omitted, the [fv] argument must
be
supplied.
[fv] - An optional argument that specifies the future value
of the
annuity, at the end ofnper payments.
If the [fv] argument is omitted, it takes on the default value
0.
[type] - An optional argument that defines whether the
payment is
made at the start or the end of the period.
The [type] argument can have the value 0 or 1, meaning:
0 - the payment is made at the end of the period;
109. Excel PV Function Examples
Example 1
In the following spreadsheet, the Excel Pv function is used to
calculate the present value of an annuity that pays $1,000 per
month for a period of 5 years. The interest is 5% per year and
each payment is made at the end of the month.
PV( rate, nper, [pmt], [fv], [type] )
Rate=……………?
Nper=………….?
[Pmt]=……………?
[Fv]=……………..?
[Type]=…………….?
111. Example 2
In the example below, the Excel Pv function is used to calculate the
present value of an annuity that pays $2,000 per quarter for a period of
4 years. The interest is 10% per year and each payment is made at the
start of the quarter.
Rate=……………?
Nper=………….?
[Pmt]=……………?
[Fv]=……………..?
[Type]=…………….?
112. Rate =10%/4
Nper =16
Pmt =2000
Fv =0
Type = 1
Excel financial function is,
=PV( 10%/4, 16, 2000, 0, 1 )
=-$26,762.76
Answer is…
113. Excel PMT Function
• The Excel PMT function calculates the constant periodic payment
required to pay off (or partially pay off) a loan or investment, with a
constant interest rate, over a specified period.
• The syntax of the function is:
• PMT( rate, nper, pv, [fv], [type] )
114. Excel PMT Function cont..
rate - The interest rate, per period.
nper - The number of periods over which the loan or investment
is to be paid.
pv - The present value of the loan / investment.
[fv] - An optional argument that specifies the future value of the
loan / investment, at the end of nper payments.
If omitted, [fv] has the default value of 0.
[type] - An optional argument that defines whether the payment is
made at the start or the end of the period.
The [type] argument can have the value 0 or 1, meaning:
0 - the payment is made at the end of the period;
1 - the payment is made at the beginning of the period.
If the [type] argument is omitted, it takes on the default
value of 0 (denoting payments made at the end of the
period).
115. Example 1
In the following spreadsheet, the Excel Pmt function is used to calculate
the monthly payments on a loan of $50,000 which is to be paid off in full
after 5 years. Interest is charged at a rate of 5% per year and the payment
to the loan is to be made at the end of each month.
PMT( rate, nper, pv, [fv], [type] )
Rate=……………?
Nper=………….?
Pv=……………?
[Fv]=……………..?
[Type]=…………….?
Excel PMT Function Examples
117. In the spreadsheet below, the Excel Pmt function is used to calculate the
quarterly payments required to increase an investment from $0 to $5,000
over a period of 2 years. Interest is paid at a rate of 3.5% per year and the
payment into the investment is to be made at the beginning of each
quarter.
Rate=……………?
Nper=………….?
Pv=……………?
[Fv]=……………..?
[Type]=…………….?
Example 2
119. Excel RATE Function
The Excel Rate function calculates the interest rate required to
pay off a specified amount of a loan, or to reach a target
amount on an investment, over a given period.
The syntax of the function is:
RATE( nper, pmt, pv, [fv], [type], [guess] )
120. Excel RATE Function cont..
nper - The number of periods over which the loan or investment is to be
paid.
pmt - The (fixed) payment amount per period.
pv - The present value of the loan / investment.
[fv] - An optional argument that specifies the future value of the
loan / investment, at the end of nper payments.
If omitted, [fv] takes on the default value of 0.
[type] - An optional argument that defines whether the payment is
made at the start or the end of the period.
The [type] argument can have the value 0 or 1, meaning:
0 - the payment is made at the end of the period;
1 - the payment is made at the start of the period.
If the [type] argument is omitted, it takes on the default
value of 0 (denoting payments made at the end of the
period).
121. Example 1
In the following spreadsheet, the Excel Rate function is used to
calculate the interest rate, with fixed payments of $1,000 per month, to
pay off in full, a loan of $50,000 over a period of 5 years. The
payments are to be made at the end of each month.
RATE( nper, pmt, pv, [fv], [type], [guess] )
Nper=……….….?
Pmt=……….…?
Pv=…………...?
[Fv]=……………?
[Type]=………..?
[Guess]=……….?
Excel RATE Function Examples
123. Example 2
In the following spreadsheet, the Excel Rate function is used to calculate the
interest rate required to save $20,000, over 2 years, with a starting value of zero,
and monthly savings of $800. The payments are to be made at the start of each
month.
Nper=……….….?
Pmt=……….…?
Pv=…………...?
[Fv]=……………?
[Type]=………..?
[Guess]=……….?
125. The Excel IRR function returns the Internal Rate of Return for a supplied series of
periodic cash flows (i.e. a set of values, which includes an initial investment value
and a series of net income values).
The syntax of the function is:
IRR( values, [guess] )
Excel IRR Function
126. Excel IRR Function cont..
values - A reference to a range of cells containing the
series of cash flows (investment and net income
values).
This must contain at least one negative and at
least one positive value.
[guess] - An initial guess at what you think the IRR might
be. This is an optional argument, which, if
omitted, takes on the default value of 0.1
(=10%).
(Note: This is only a value for Excel to start off
working with - Excel then uses an iterative
procedure to converge to the IRR).
127. Excel IRR Function Examples
Example 1
In the spreadsheet below, an initial investment of $100 is shown in
cell B1 and the net income over the next 5 years is shown in cells B2
- B6.
The IRR function in cell C2 shows the calculation of the Internal Rate
of Return after 3 years and the function in cell C4 shows the Internal
Rate of Return after 5 years.
IRR( values, [guess] )
128. Formula:
Answer is…
Result:
A B C
1 Initial Investment: -$100.00 IRR after 3 yrs:
2 Year 1 Income: $20.00 =IRR( B1:B4 )
3 Year 2 Income: $24.00 IRR after 5 yrs:
4 Year 3 Income: $28.80 =IRR( B1:B6 )
5 Year 4 Income: $34.56
6 Year 5 Income: $41.47
A B C
1 Initial Investment: -$100.00 IRR after 3 yrs:
2 Year 1 Income: $20.00 -14%
3 Year 2 Income: $24.00 IRR after 5 yrs:
4 Year 3 Income: $28.80 13%
5 Year 4 Income: $34.56
6 Year 5 Income: $41.47
150. LECTURE 5 OBJECTIVES
•Extracting a Unique list
•Using Criteria in Excel Advanced
Filter
•Using the AND Criteria
•Using WILDCARD Character *
(asterisk)
•Using WILDCARD Character ?
(question mark)
•Using WILDCARD Character ~
(tilde)
151. Microsoft Excel 2013
UNDERSTANDING LISTS
Microsoft Excel is quite often used to create lists
– such as lists of customer contacts, lists of items
in an inventory, lists of employees, lists of
upcoming events, and the like. To cater for these
kinds of lists, Microsoft Excel allows you to perform
sort operations so that all of the data in the list can
be rearranged in a more desirable and logical
fashion.
Lists – The Key to Understanding Sorting
To understand how Microsoft Excel performs a sorting operation you first need to grasp the concept of a
list in Microsoft Excel.
When you make a cell active Excel analyses all of the adjacent cells – up, down, left and right. It
considers all of the cells around the active cell to be part of a list range as long as the cells contain data.
So, in Excel, a list is automatically defined as the area around the active cell that contains data. The
boundary of the list range is defined when an empty cell is encountered. In the example below, the
active cell is C4. Excel therefore deems the list to be the one bounded by empty cells – in other words,
the list is made up of all of the non-empty cells.
The list extends to the left as far as column A, and to the right as far as column G. It doesn’t go up any
more rows because C3 is an empty cell. It goes down as far as row 23, the last non-empty cell in the
column. So the list range is automatically defined as A4 to G23.
You can make any cell in this list the active cell and the list range will be the same. You don’t have to
select or highlight the range.
Sorting a List
Once a list is available to Excel, the data in it can be sorted. The data is usually sorted down a column,
known in database jargon as a field. Data is sorted alpha-numerically, meaning that alphabetical
characters are sorted first, and then numbers. If there are only alphabetical characters in it then the list
will be sorted alphabetically from left to right. If there are only numbers the list will be sorted numerically.
If there is mixed data the list will be sorted by alphabetical characters and then by numbers.
Lists can be sorted in ascending order (from lowest to highest) and in descending order (from highest
to lowest).
Information Services Page 1 ITtraining@sgul.ac.uk
152. Microsoft Excel 2013
PERFORMING AN ALPHABETICAL SORT
For Your Reference…
To alphabetically sort data in a list:
1. Click in the column to sort, then click on the
HOME tab
2. Click on Sort & Filter in the Editing group
and select either Sort A to Z to sort in
ascending order, or Sort Z to A to sort in
descending order
Handy to Know…
When you choose to sort, Excel searches in
all directions from the active cell. The end of
the list is deemed to be the first blank cell
encountered in all directions: up, down, left
and right.
Excel assumes that the first row of the list
contains the column heading or field.
The most common use for sorting is to rearrange
the data in a list in a specific order. A list is
simply a grouping of data without any empty
columns or rows. In a list, a single column can
be sorted by placing the cell pointer anywhere in
the column that you wish to sort and choosing the
Sort & Filter command in the Editing group.
2
3
Information Services Page 2 ITtraining@sgul.ac.uk
Try This Yourself:
Open
File
Before starting
this exercise
you MUST open
the file E1327
Sorting_1.xlsx…
Click on the Sorting
Text worksheet tab
and spend a few
moments studying the
data – it is a list of
employees
Click in cell C4 to select
the cell – this is the Last
Name column of the
listing
On the HOME tab,
click on Sort & Filter
in the Editing group
and select Sort A to Z
The data in the list will
be sorted
alphabetically in
ascending order by
last name…
Click on Sort & Filter
in the Editing group
again and select Sort Z
to A to sort the data in
descending order
Repeat the above steps
and sort the list by
Position, by Office, and
finally by E-Mail
153. Microsoft Excel 2013
PERFORMING A NUMERICAL SORT
For Your Reference…
To sort a list numerically:
1. Click in the column to sort
2. On the HOME tab, click on Sort & Filter in
the Editing group and select either Sort
Smallest to Largest to sort in ascending
order or Sort Largest to Smallest to sort in
descending order
Handy to Know…
If a numeric column contains a formula which
displays a calculated value, the sort
operation will be performed on the calculated
value rather than the formula.
Microsoft Excel allows you to sort all kinds of
data – alphabetic, numeric, dates and mixed.
When you place the cell pointer in a cell, Excel
determines the data type in that cell and amends
the sort commands accordingly. For example,
when sorting alphabetical data, the command will
be Sort A to Z, but for numeric data it changes to
Sort Smallest to Largest.
2
4
Information Services Page 3 ITtraining@sgul.ac.uk
Try This Yourself:
Same
File
Continue using the
previous file with
this exercise, or
open the file
E1327
Sorting_2.xlsx...
Click in cell A4
which represents
the start of the
employee No
column
On the HOME tab,
click on Sort & Filter
in the Editing group
and select Sort A to
Z to sort the data in
ascending order
Notice how the list
is sorted first by
letters, then
numbers…
Click in cell I5 which
is the start of the Age
column – these cells
store numbers
Click on Sort &
Filter in the Editing
group again and
select Sort
Smallest to
Largest to sort the
data from youngest
to oldest
Repeat the above
steps and sort the
list by Telephone,
by Salary Level
and by Service
154. Microsoft Excel 2013
SORTING ON MORE THAN ONE COLUMN
For Your Reference…
To sort on more than one column:
1. Click on the HOME tab, then click on Sort &
Filter in the Editing group
2. Select Custom Sort
3. Specify the columns to sort the list on
Handy to Know…
Be careful when sorting large lists that go
beyond the boundaries of the screen. You
should ensure that there are no blank rows
or columns that can result in you omitting
some of the data.
Excel allows you to select multiple columns to
sort by, thereby enabling you to analyse data
according to different categories. Each column is
sorted in order one at a time. The listing is sorted
by the first column, then by the second column, and
so on. For example, a staff listing can be sorted
first by Position, then by Last Name so that each
position contains an alphabetical sub-listing.
2
5
6
Information Services Page 4 ITtraining@sgul.ac.uk
Try This Yourself:
Same
File
Continue using the
previous file with this
exercise, or open the file
E1327 Sorting_3.xlsx...
Click in cell A4 to
position the active
cell within the list
On the HOME tab,
click on Sort & Filter in
the Editing group and
select Custom Sort to
display the Sort dialog
box
Click on the drop
arrow for Sort by to
display a list of the
field (column) names,
then click on Position
Click on [Add Level]
to add another level in
the dialog box
Click on the drop arrow
for Then by and click on
Last Name
Click on [OK] to
display the list sorted
by Position then by
Last Name
155. Microsoft Excel 2013
UNDERSTANDING FILTERING
Filtering refers to comparing a list of records
against specific criteria and then hiding the
records that don’t match the criteria. It can be
used simply to help find a record, or to create a
subset of data that you can then edit, format, copy,
move, chart or otherwise manipulate without
affecting the other records. Here’s a brief example
of how simple filtering works.
An Example of Filtering
Here is a list of 65 records in a table. The field names appear at the top and are No, First Name, Last
Name and so on. After filtering using the criterion of Type = Gold, the list is reduced to the 16 records
that have the word Gold in the Type column and the other records are hidden. Notice the row numbers
on the left – these confirm that some of the rows are not visible
Information Services Page 5 ITtraining@sgul.ac.uk
156. Microsoft Excel 2013
APPLYING AND USING A FILTER
For Your Reference…
To turn the filter on or off:
1. Click in the data, click on the DATA tab, then
click on Filter in the Sort & Filter group
To apply a simple filter:
1. Click on a filter arrow, click on (Select All),
then click on an option and click on [OK]
Handy to Know…
If the column that you want to filter includes
blank cells, you will also have the option
(Blanks) to choose from. This can be used
to help you locate missing data.
The Filter command applies (or removes) drop
arrows to the right of the column labels in the list.
When you click on a Filter arrow, it displays a list
of the unique items in the column, including
blanks and non-blanks. By selecting an item from a
list for a specific column, you can instantly hide all
rows that don't contain the selected value, and
display only those that do.
1
2
4
Information Services Page 6 ITtraining@sgul.ac.uk
Try This Yourself:
Open
File
Before starting this exercise
you MUST open the file E1328
Filtering Data_1.xlsx...
Click anywhere in the list
The values in Years in your
worksheet may vary from those
shown here because Years
updates automatically to show
the current duration of
membership…
Click on the DATA tab,
then click on Filter in the
Sort & Filter group
Click on the filter arrow to the
right of Type to display a list of
options
Click on (Select All) to remove
all of the ticks, then click on
Gold and click on [OK]
All records for Gold
memberships will be
shown and the rest of the
records temporarily
hidden.
Notice that the drop arrow next
to Type has changed indicating
that a filter is active on this
column
157. Microsoft Excel 2013
CLEARING A FILTER
Once a filter has been applied, a subset of data is
shown in the list. Before you can apply an
alternative filter, the first one must be cleared so
that all of the records become available again.
For Your Reference…
To clear the filter:
1. Click on the filter arrow
2. Select Clear Filter From “fieldname”
To remove the filter arrows:
1. Click on the DATA tab, then click on Filter in
the Sort & Filter group
Handy to Know…
You can remove the filter altogether in one
step by clicking on Filter . Use the Clear
Filter From command when you want to
perform subsequent filters.
Filters can be cleared either by clicking on (Select
All) in the filter options list or by selecting Clear
Filter From “fieldname” from the menu. You can
also remove the filter arrows altogether.
1
2
3
Information Services Page 7 ITtraining@sgul.ac.uk
Try This Yourself:
Same
File
Continue using the previous
file with this exercise, or
open the file E1328 Filtering
Data_2.xlsx...
Examine the list of
records in the
spreadsheet
You’ll notice that it is
currently filtered on
Gold under Type...
Click on the filter arrow
for Type and select Clear
Filter From “Type”
All of the records will
again be listed. You can
also remove the filter
altogether...
Ensure the DATA tab is
active, then click on Filter in
the Sort & Filter group to
remove the filter arrows
158. Microsoft Excel 2013
CREATING COMPOUND FILTERS
For Your Reference…
To create a compound filter:
1. Apply the first filter to the list to display a
subset of the records
2. Apply a second filter to the list to show a
subset of the subset of records
Handy to Know…
When you print a filtered list, Excel will print
the list as shown in the worksheet, with all of
the unwanted records hidden.
The Filter tool allows you to select a filter on one
column or field at a time. When the filter is
applied, the records that match that filter will be
displayed. As you create successive filters on
other fields, the filters are applied to only the
records that are currently on display. In other
words, the filters build up on each other, or
compound, refining the list as required.
2
3
5
Information Services Page 8 ITtraining@sgul.ac.uk
Try This Yourself:
Same
File
Continue using the previous
file with this exercise, or open
the file E1328 Filtering
Data_3.xlsx...
Click anywhere in the list,
ensure the DATA tab is active,
then click on Filter in the Sort
& Filter group to display
the filter arrows
Click on the filter arrow for
Type and click on (Select All),
then click on Theatre and click
on [OK]
Only the records for
Theatre are displayed…
Click on the filter arrow for
Suburb, click on (Select All),
click on Heidelberg Heights,
then click on [OK]
Only the Theatre members
in Heidelberg Heights are
now shown. Let’s see if there
are other members who live
in Heidelberg Heights...
Click on the filter arrow for
Type and select Clear
Filter From “Type”
Now that the list is filtered to
show all Types in
Heidelberg Heights, a
Junior member is also
listed...
Click on the filter arrow
for Suburb and select
Clear Filter From
“Suburb”
159. Microsoft Excel 2013
MULTIPLE VALUE FILTERS
You may want to list records by creating two
criteria for one field so that you can select
records with one of two possible values. For
example, you may want to see all the records for
For Your Reference…
To filter on multiple values:
1. Click on the filter arrow for the required field
2. Click on (Select All)
3. Click on the checkboxes for each of the
values that you want to filter by
4. Click on [OK]
Handy to Know…
Using multiple values in criteria is the same
as saying, for example, if Suburb = Ascot
Vale OR Suburb = Bentleigh.
If the field is a date field, you can filter on
specific years, specific months or even
specific dates. These are all provided for
easy access in the filter menu.
two particular suburbs, or two membership types.
The filter options list all of the unique values found
in that field in the list, so you can click on any of the
values that you want to display.
2
3
Information Services Page 9 ITtraining@sgul.ac.uk
Try This Yourself:
Same
File
Continue using the
previous file with this
exercise, or open the
file E1328 Filtering
Data_4.xlsx...
Click on the filter arrow
for Suburb and click on
(Select All) to remove
the ticks
Click on Ascot Vale
and Bentleigh so that
ticks appear next to
both items
Click on [OK] to display
the filtered list
Only those records with
Ascot Vale or Bentleigh
in the Suburb are
listed...
Click on the filter arrow
for Suburb and select
Clear Filter From
“Suburb” to list all of the
records
160. Microsoft Excel 2013
CREATING CUSTOM FILTERS
The Filter feature enables you to create
individual conditions for multiple fields using the
drop-down lists. To set more than one condition
per field you can use the Custom Filter option.
For Your Reference…
To create a custom filter:
1. Click on the filter arrow for the field
2. Select FieldType Filters > [option]
3. Type the filter criteria
4. Click on [OK]
Handy to Know…
If you are not sure how to spell a word, but
know that it includes particular letters, you
can search using the criteria contains.
Each of the equals, contains, begins with,
and ends with criteria have an opposite
choice e.g., does not equal, does not
contain etc.
This is ideal if you want to select records with one
of several possible values, or where you want a
record that falls within a range of values rather than
matching an exact value.
1
2
3
Information Services Page 10 ITtraining@sgul.ac.uk
Try This Yourself:
Same
File
Continue using the
previous file with this
exercise, or open the
file E1328 Filtering
Data_5.xlsx...
Click on the filter arrow
for Last Name, point to
Text Filters, then select
Begins With
The Custom
AutoFilter dialog box
will display…
Type W, as shown
Click on [OK] to filter the
list so that all members
with last names
beginning with W are
listed
Repeat steps 1 to 3 to
create a list of
members whose
surnames start with S
Click on the filter arrow
for Last Name and select
Clear Filter from “Last
Name”
161. Microsoft Excel 2013
USING WILDCARDS
If you need to filter for specific values in a list,
you can select them individually from the filter
menu or use wildcards to create a more
powerful filter. Wildcards are characters that can
be substituted for any character (?) or series of
characters (*). For example, B*N would find all
words starting with B and ending with N, while B?N
would find the same, but look for three letters.
For Your Reference…
To use wildcards in custom criteria:
1. Click on a filter arrow, then point to Text
Filters
2. Select Custom Filter
3. Enter a criteria with either an * or a ?
depending on what you are searching for
2
4
Handy to Know…
You can filter for the question mark or
asterisk character as the actual character
itself, and not the wildcard character, by
preceding the character with the tilde ~. For
example, if you use the criteria Year~?,
Excel will search for the character string
Year?.
5
6
Information Services Page 11 ITtraining@sgul.ac.uk
Try This Yourself:
S
a
m
e
F
i
l
e
Continue using the previous
file with this exercise, or
open the file E1328 Filtering
Data_6.xlsx...
Click on the filter arrow for
Last Name, point to Text
Filters, then select
Custom Filter to display
the Custom AutoFilter
dialog box
Type S*
Click on [OK] to see the
members whose names
begin with the letter S
Repeat step 1 to display the
Custom AutoFilter dialog box
Notice that Excel
changed your criteria
so that it now reads
“begins with S”…
Click on the drop arrow below
Last Name, scroll up and
select equals, then click in the
field to the right of S and
type *n
Click on [OK] to see the
names that begin with S
and end with n
Click on the filter arrow for
Last Name and select
Clear Filter From “Last
Name” to display all of the
records
162. Microsoft Excel 2013
UNDERSTANDING ADVANCED FILTERING
To work with Advanced Filters in Excel, you
need to understand a few of the concepts that
are used. A list in Excel is a series of rows of
information. Each row is effectively one unit of
information. This structure is very similar to a
simple database and therefore Excel uses similar
terminology to describe the parts of the list. The
following illustrates a list and its parts.
Fields, Field Names and Records
A field is a column in the list of data. In the example below, the column of data for the Last Name is an
example of a field.
The field name is the heading at the top of the column. The field names within one list must be unique.
In the example below, the text Annual Fee is an example of a field name.
A record is a row of data in the list. Each record is one item of data in the list. In the example below, the
row of information for Fred Jackson is one record. Note that advanced filters do not work correctly if
there are blank rows in the list.
Field Field Name
Criterion Range
Record
Criteria, Criteria Range, AND and OR
Criteria are tests against the data in specific fields, for instance Gold. When Gold is tested against the
field Type, the filter would display only the people with Gold memberships. All other records are filtered
out (hidden).
The criteria range is the area where you specify the criteria. The first row contains the field names that
mirror those in the list. The second and subsequent rows are used to type the criteria or examples of
what you are looking for in the list.
If you want the conditions between fields joined with an AND, you write the conditions on the same row.
If you want them joined with an OR, you write the conditions on separate rows. In the next example, our
criteria specifies greater than 15 years membership AND Gold membership.
Criterion
Information Services Page 12 ITtraining@sgul.ac.uk
163. Microsoft Excel 2013
USING AN ADVANCED FILTER
To use an Advanced Filter, you need to create a
criteria area, enter your criteria, specify the list to
be filtered and then run the filter. The Advanced
Filter tool has one distinct advantage over other
filtering techniques (such as AutoFilter), you type
your criteria directly into the worksheet. The criteria
are always visible in the worksheet above the
records that you have filtered.
2
5
For Your Reference…
To use the Advanced Filter:
1. Create the criteria range
2. Click in the list to be filtered
3. Click on the DATA tab, then click on
Advanced in the Sort & Filter group
4. Type the Criteria range, then click on [OK]
Handy to Know…
When using the Advanced Filter dialog box,
if you can’t remember the range of cells that
hold certain values (e.g. Criteria range), you
can click on Collapse Dialog which moves
the focus to the workbook, enabling you to
select the actual cells on the relevant
worksheet.
4
6
Information Services Page 13 ITtraining@sgul.ac.uk
Try This Yourself:
O
p
e
n
F
i
l
e
Before starting this
exercise you MUST open
the file E1357 Advanced
Filters_1.xlsx...
Study the list of records
to familiarise yourself
with the data
First we need to add criteria...
Type the labels and values
in the range D2:E3 as
shown
The criteria reads “where
Years are greater than or
equal to 20 AND the Type
is Silver”. Now to apply the
filter...
Click in cell E6 so that
Excel can locate the list
Click on the DATA tab, then
click on Advanced in the Sort
& Filter group to display the
Advanced Filter dialog box
The List range is automatically
selected...
Click in Criteria range,
then type D2:E3
Click on [OK]
Only the records matching the
criteria will be displayed...
On the DATA tab, click
on Clear in the Sort &
Filter group to restore
the list
164. Microsoft Excel 2013
EXTRACTING RECORDS WITH ADVANCED FILTER
The Advanced Filter can be used to filter a list in
place (hiding unwanted records) or to extract
required records and paste them in another
location. By creating a subset of the list, you can
further analyse the data without risking accidental
modifications of the original list. You must specify
the fields that you want and the location where the
records are to be copied.
Try This Yourself:
Continue using the
previous file with this
exercise, or open the file
E1357 Advanced
Filters_2.xlsx...
Same
File
Scroll down to and click
in cell C75
This is a blank cell which
appears below the list…
Type the field headings
as shown
These are the fields that
we want to extract
according to the criteria
listed at the top of the
worksheet...
Click anywhere in the
original list
Click on the DATA tab
then click on Advanced
in the Sort & Filter
group
Under Action click on
Copy to another
location
Click in Copy to and
type C75:F75
Click on [OK], then scroll
down and examine the
extracted data
2
5 6
For Your Reference…
To extract records using the Advanced Filter:
1. Create the criteria and extract ranges
2. Click on the DATA tab, then click on
Advanced in the Sort & Filter group
3. Click on Copy to another location
4. Type the Criteria range and Copy to range,
then click on [OK]
Handy to Know…
You can use the extract feature of the
Advanced Filter to create a list of unique
codes that are used in a list. For example, to
create a list of Type codes, extract the Type
field with no criteria and select the checkbox
Unique records only in the Advanced
Filter dialog box.
7
Information Services Page 14 ITtraining@sgul.ac.uk
165. Microsoft Excel 2013
USING FORMULAS IN CRITERIA
By making slight adjustments to the criteria range
and using a formula for the criteria, you can
create more sophisticated filters. The first row of
the criteria range must contain a label that is not
the same as a field heading. The criteria example
in the second row must be expressed as a
formula. The formula often makes a comparison
using the first record as a model for all others.
For Your Reference…
To use formulas in criteria:
1. Type a criteria heading that does not match
a field name
2. Create a formula (starting with =) below the
heading that performs a comparison with the
value of a field in the first record
2
4 5
Handy to Know…
When you perform the copy operation during
filtering, Excel names the header row of the
copied records as Extract. It names the cells
containing the criteria range as Criteria. You
can use these names to navigate quickly to
the extract or criteria ranges of the worksheet
via the Name box.
6
Information Services Page 15 ITtraining@sgul.ac.uk
Try This Yourself:
Same
File
Continue using the previous
file with this exercise, or
open the file E1357
Advanced Filters_3.xlsx...
Delete the contents of cells
D2:E3
Type the headings AveMem in
cell D2 and Average
Membership in cell F2 as
shown, then enter these
formulas:
in F3 =AVERAGE(E7:E70)
in D3 =E7>$F$3
The formula in F3 calculates
the average Years (20.4), then
the formula in D3 tests the
Years of the first record
against the average. If the
Years are higher than the
average, the answer is TRUE.
Let’s now extract the matching
records...
Click in the list, then click
on the DATA tab
Click on Advanced in the Sort
& Filter group,
then double-click
on $E$3 in
Criteria range and type D3
Click on Copy to another
location in Action – we’ll
use the same Copy to cell
range
Click on [OK], then scroll down
to examine the extracted data
169. LECTURE 6 OBJECTIVES
•Understanding data validation
•Creating a number of range
validations
•Testing a validation
•Creating an Input message
•Creating an error message
•Creating a dropdown list
•Creating formulas as validation
•Circling invalid data