Excel 2016 Further Functions: Course Objectives
Excel 2016 Further Functions: Course Objectives
Further Functions
Course objectives:
• Understand and use different functions effectively
• Text Functions
• Date and Time Functions
• Math and Trig Functions
• Lookup and Reference Functions
• Logical Functions
• Statistical Functions
Service Points
St Lucia: Main desk of the SSAH, ARMUS and DHESL libraries
Hospitals: Main desk of the PACE, Herston and Mater libraries
Gatton: Level 2, UQ Gatton Library
Staff may contact their trainer with enquiries and feedback related to training content. Please contact Staff Development for booking
enquiries or your local I.T. support for general technical enquiries.
Reproduced or adapted from original content provided under Creative Commons license by
The University of Queensland Library
UQ Library
Staff and Student I.T. Training
Table of Contents
Text Functions ................................................................................................................. 3
“PROPER” Function.................................................................................. 3
“EXACT” Function ..................................................................................... 4
“TRIM” Function ........................................................................................ 5
“CONCATENATE” and “RIGHT” Functions ............................................... 6
Flash Fill ................................................................................................... 8
Extension Exercises...................................................................................................... 17
Exercise document:
Text Functions
Text functions are used when working with cells containing text strings. Some of the many
functions available can…change text case, compare cells containing text strings and even
split or concatenate (join) text strings.
“PROPER” Function
This function is used to convert the case of text strings e.g. lower case to Proper Case. Other
functions in this class are Lower and Upper. The proper function capitalises the first letter of
each word in the selected text.
1. Open the
Excel2016_Further_Functions file
and open the Exams sheet
2. Select cell C1
3. Click on the Home tab > Cells group
4. Click the dropdown arrow under
Insert
5. Select Insert Sheet Columns
This inserts a new blank column - C
6. Select cell C2
Notes
“EXACT” Function
This function tests if two supplied text strings are exactly the same (Cell to cell comparison).
This exercise checks to determine if the list of student names in the Fees worksheet is the
same as the list of student names in the Exams worksheet
Notes
“TRIM” Function
This function removes additional spaces (leading, middle, trailing) from text.
Notes
4. Select cell C2
5. Click on Insert Function icon to bring
up the dialogue box
6. In the Select a Function area click
on Trim
If the function is not in the function list, type the
name or description in the Search for a function
text area and click Go
7. Click on OK to bring up the function
arguments dialogue box.
Notes
Flash Fill
This function gives the ability to create new data sets from existing data based on patterns. It
can be used to extract, insert, format, concatenate, reverse, etc., different types of data.
This exercise will separate student names into first and last names.
9. Click on cell F2. The formula will appear in the formula bar
10. Add the following to your formula &DATEDIF(D2,TODAY(),"MD")&" Days "
11. Press Enter
12. This calculates the number of complete years, months and Days.
13. Fill down the calculation for the other students
“SUMIF” Function
The SUMIF function adds data in the cells in a supplied range that satisfy a given criterion.
Calculate the amount of fees paid per semester by each degree type
1. Open the Fees sheet and select cell
L66
2. Click on Insert Function icon to bring
up the dialogue box
3. In the Select a Function area click
on SUMIF
If the function is not in the function list, type the
name or description in the Search for a function
text area and click Go
4. Click on OK to bring up the function
arguments dialogue box.
Notes
“SUMIFS” Function
The SUMIFS function adds data in the cells in a supplied range, that satisfy multiple criteria.
Calculate the amount of fees paid per semester by Masters students in ICT
1. Open the Fees sheet and select cell
L67
2. Click on the Insert Function icon to
bring up the dialogue box
3. In the Select a Function area click
on SUMIFS > OK
4. Type in the following arguments:
• Sum_range: L2:L62
• Criteria_range1: $K$2:$K$62
• Criteria1: Masters
• Criteria_range2: $J$2:$J$62
• Criteria2: ICT
5. Click on OK
6. Autofill to the right to get the values
for the other semesters
NB: Use absolute referencing to lock the criteria
ranges before applying Autofill
Notes
“SUMPRODUCT” Function
The SUMIFS function has the limitation of being unable to sum multiple ranges for the selected
criteria. The Sumproduct function can be used to overcome this. Sumproduct returns the sum
of the products of corresponding values in two or more supplied arrays
Calculate the amount of fees paid for sem 1 and sem 4 by Masters students in ICT
1. Open the Fees sheet and select cell L71
2. Enter the following formula…
3. Press Enter
The function computes the total amount of fees paid by ICT Masters students for Semesters 1 and 4.
This saves having to do multiple calculations to achieve the same result.
Dropdown Lists
Typing existing data into formulas can result in errors. For example, having trailing spaces
after a value can cause an error in the evaluation of a formula. Predefined dropdown lists in
excel can be used to avoid unnecessary data entry.
1. Open the Fees sheet and select
cell L73
2. Select the Data tab > Data tools
group > Data Validation
Notes
“MATCH” Function
The MATCH function finds the relative position of a value in a supplied list or array. The value
of the MATCH function is not very obvious when used on its own. It is however a very useful
function when combined with other functions.
Match Types:
-1 : Greater than
0 : Exact
1 : Less than
Notes
“INDEX” Function
The INDEX function returns the data in a cell (or range of cells) for given rows and columns.
The use of the INDEX function requires the user to know the row and column location of the data to be
returned. This can be difficult, especially on large spreadsheets.
The solution to this problem is to use the function together with other functions such as the MATCH function,
which automatically identifies the relative row and column of a value.
3. Press Enter
The MATCH functions will determine the relative positions of the values entered in cells L73 and
L74. The INDEX function will then use those positions to output the required data. In this example
the result will be how much a particular student owes in a particular semester.
Notes
Logical Functions
“AND” Function
The AND function compares a number of user-defined logical conditions and returns TRUE if
ALL of the conditions evaluate to true, or FALSE if not. It is useful if you want to check if all
values satisfy certain specified criteria. A total of 255 logical conditions can be tested.
3. Press Enter
The formula uses the result of the AND function as the logical test for the IF statement and returns a value of
Qualified if TRUE and a value of Not Qualified if FALSE.
4. Fill down to complete the data
Notes
Statistical Functions
“COUNTBLANK” Function
The COUNTBLANK function returns the number of blank cells in a supplied range of cells. It
is useful in large spreadsheets with missing values.
“COUNTIF” Function
The COUNTIF function returns the number of cells in a range, that satisfy a given criterion.
Notes
“COUNTIFS” Function
The COUNTIFS function returns the number of cells in a range, that satisfy a set of given
criteria.
Notes
Extension Exercises
The information and exercises in the following pages are included for those who want to learn
some extra functionality in Excel.
This opens the dialogue box for you to enter the URL
of the web page with the data you want to import
Notes
NB: You can use the edit button to clean the data
before importing
8. Click on Load
Year calculations
Calculate Age from Date of Birth
Note: Subtracting a date of birth from the current date will display the number of days between the two dates. To
find out the age in years, divide by 365.25 (the .25 allows for leap years).
1. Open the Fees Extension sheet
2. Select cell E2
3. Type in the following formula:
=ROUNDDOWN((TODAY()-D2)/365.25,0)
4. Press Enter
5. Use the AutoFill tool to calculate the remaining
results.
Note: The Rounddown function has the following structure. =Rounddown(number,num_digits). In the above
formula the number portion is generated by the formula (TODAY()-d2)/365.25. The num_digits portion is
designated zero meaning round down to zero e.g. 28.96 becomes 28.00.
Notes
“NETWORKDAYS.INTL” Function
The NETWORKDAYS function returns the number of whole working days between a specified
start_date and end_date. Working days exclude weekends and any dates identified as
holidays. To calculate whole workdays between two dates by using parameters to indicate
which and how many days are weekend days, use the NETWORKDAYS.INTL function. This
function is useful in situations where work shifts may cause some employees’ non-work days
to fall within Monday-Friday and result in Saturdays and Sundays being work days for others.
Weekend number values in the formula indicate the following weekend days:
1 or omitted Saturday, Sunday 11 Sunday only
2 Sunday, Monday 12 Monday only
3 Monday, Tuesday 13 Tuesday only
4 Tuesday, Wednesday 14 Wednesday only
5 Wednesday, Thursday 15 Thursday only
6 Thursday, Friday 16 Friday only
7 Friday, Saturday 17 Saturday only
TIP: Weekend days can be added to the formula using a 7-character binary string, where Zero
(0) represents work days and One (1) represents non-work days.
Each character represents a day of the week, starting from Monday. Thus a weekend value
specified as “0000111” means Monday – Thursday are work days and Friday – Sunday are
non-work days.
Notes
“IFNA” Function
Excel formulas can sometimes return errors depending on the formula being evaluated or the
arguments provided. While some errors will require changes in the formula entered, others
are merely because of unavailable data. Excel displays errors in a variety of ways including
#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? and #NULL!.
To display these errors in a more meaningful way, excel provides some logical functions that
allow the user to define alternative text for the error. Two of the most popular ones are IFNA
and IFERROR
IFNA tests if an expression returns the #N/A error and if so, returns an alternative specified
value; Otherwise the function returns the value of the supplied expression.
Prevent the INDEX and MATCH function from displaying #N/A error if no value is
provided for Student and Semester
3. Press Enter
4. Delete the Semester value from cell L74
All #N/A errors will now be displayed as “Name or Semester value not provided.
The difference between IFERROR and IFNA function is that IFNA only works on #N/A
errors whereas IFERROR works on all other error types
“IF” Function
The IF function will analyse data and provide results defined by the user. The analysis returns
either a true or false answer. The displayed results can be text or calculated values.
Using IF statement to display Final GPA
Notes
“RANK.EQ” Function
The RANK.EQ function returns the rank of a number in a list of numbers. Its size is relative to
other values in the list; if more than one value has the same rank, the top rank of that set of
values is returned. This means that RANK.EQ gives duplicate numbers the same rank.
However, the presence of duplicate numbers affects the ranks of subsequent numbers. For
example, in a list of integers sorted in ascending order, if the number 10 appears twice and
has a rank of 5, then 11 would have a rank of 7 (no number would have a rank of 6).
What-If Analysis
What-if analysis is the process of changing the values in cells to see how those changes will
affect the outcome of formulas on the worksheet. What-if analysis tools in Excel include
Scenarios, Goal Seek and Solver. Scenarios take sets of input values and determine possible
results. Goal Seek and Solver takes a result and determines possible input values that
produce that result. To be able to perform some kinds of analysis (eg. Solver), additional add-
ins are required.
Including Add-ins
Excel Solver
In Excel, Solver is part of a suite of commands sometimes called what-if analysis tools. With
Solver, you can find an optimal (maximum, minimum or exact) value for a formula in one cell
- called the objective cell - subject to constraints, or limits, on the values of other formula and/or
cells on a worksheet. Solver works with a group of cells - called decision variable cells - that
participate in computing the formulas in the objective and constraint cells. Solver adjusts
the values in the decision variable cells to satisfy the limits on constraint cells and produce the
result you want for the objective cell.
The objective, constraint and decision variable cells, and the formulas interrelating them form
a Solver model; the final values found by Solver are a solution for this model. Solver uses a
variety of methods, from linear programming and nonlinear optimization to genetic and
evolutionary algorithms, to find solutions.
Notes
Notes
Notes