Intermediate Excel Functions
Microsoft Excel
Introduction
Excel is a powerful tool with many functions for manipulating and formatting data. This class will explore about 20 formulas, but these are just the tip of the iceberg. Excel has roughly 350 builtin formulas, depending on the version you use, but being able to use just a handful of them proficiently will go a long way in helping you get what you need from your data, and getting the data properly formatted to import into PowerSchool.
In this course, you’ll learn how to:
 Use formulas to properly format data for importing into PowerSchool
 Use formulas to add to, extract from, combine, and alter different types of data
Getting Started In Excel
Before diving into the functions that are available in Excel, first become familiar with some terms that will be used throughout this course. Then learn how to open files in the format that PowerSchool exports: delimited text.
 Function – a builtin rule that tells Excel what to do with the arguments contained within it
 Formula – usually made up of one or more functions and dictates the value displayed in a cell
 Arguments – the variable parts of a function, separated by commas, that determine the result
 String – a collection of characters that Excel considers to be text; usually a string contains at least one letter
Refer to the figure on Excel terms to see a sample formula with labels for each of its parts.
Using BuiltIn Tools
Excel has several builtin tools that make some basic formatting and data manipulation tasks quick and easy. These aren’t formulas, but rather selectable actions that you can perform on a cell or group of cells.
“Find and Replace”
The first handy tool is Excel’s “Find and Replace” feature. This works similarly to Word’s “Find and Replace” feature, and is a quick way to replace a fixed string of text within another, larger string.
Interaction 2 – Slides
Activity 1 – Using The “Find and Replace” Feature
Phone numbers in your data file aren’t all in the same format. Use “Find and Replace” to remove any characters beyond the numbers. Then change the cell format so the phone numbers all appear in the format (XXX) XXXXXXX.
 Open the ExcelAdapt_Activities.xlsx file
 Verify you’re on the Student Info worksheet
 Select the data in the Student Phone column by clicking cell C2, then pressing Command + Shift + the down arrow. Excel 2013 users, click cell C2, and then press Ctrl + Shift + the down arrow
 Press Ctrl + H to open the Replace window
Selecting the column data limits the changes you make using the “Find and Replace” function to the selected range of cells.
 In the “Find what” field, enter ( and leave the “Replace with” field blank
Leaving the second field blank will cause the search term to be deleted from the selected range of cells.
 Click Replace All
Notice that all open parentheses have been removed.
 Click OK to confirm the number of changes
 With the column still selected, repeat the find and replace process with the following characters separately:
)

A blank space (type a single space in the “Find what” field; all spaces will be removed from the selected cells) When you’re done, you should have phone numbers with no characters between the digits.
 Close the Replace window
 With the data in the Student Phone column still selected, rightclick the selected cells, and choose Format Cells from the menu
 On the Number tab, select the Special category and choose Phone Number
 Click OK
“Text To Columns”
There may be times when you want to split one column of cells, each containing several pieces of data, into multiple columns. Perhaps a column has both first and last names and you want to separate them, or maybe a delimited text file was imported, but not split by the delimiters so multiple columns of data got inserted into one.
As long as there’s a common delimiter in the cells, use “Text to Columns” to separate the data.
Interaction 3 – Slides
Review how to split a column of data into multiple columns. Click to view slide(s).
Activity 2 – Using the ”Text To Columns” Feature
Divide a column of teacher names into separate columns for their first, middle, and last names.
 In the ExcelAdapt_Activities.xlsx file, select the Teacher Info worksheet
 Select the data in the Full Teacher Names column, excluding the column heading
 Click the Data tab in the ribbon, and then click Text to Columns
 Verify that Delimited is selected as the file type and click Next
 Select Comma and Space as the delimiters, clear the Tab check box, and then click Next
When any of the selected delimiters appears, a break in the data occurs. Since there’s both a comma and a space between the last and first names, but only a space between first names and middle initials, be sure to keep Treat consecutive delimiters as one selected. This way last names, first names, and middle initials will all be broken out into separate columns.
 Enter C2 as the destination; this is the cell where the data set will start
Take a look at the “Data preview” area. Here you can get an idea of where your data will split and what it will look like.
 Click Finish
 Scroll down the list of names and manually fix any entries that split when they shouldn’t have
Since a space is a delimiter, any first names with a space get split into separate columns.
Conditional Formatting
Use the conditional formatting tool to apply your chosen formatting to cells in a range that meet your selected condition(s). One useful way to use conditional formatting is to identify and highlight duplicate values.
Activity 3 – Using The Conditional Formatting Feature
Use conditional formatting to find and remove duplicate records on the State Exam worksheet.
 Select the State Exam worksheet
 Select the data in the Student ID column, excluding the column heading
 On the Home tab of the Ribbon, click Conditional Formatting, and then choose New Rule
 Mac users, in the window that appears, select Classic from the Style menu (Excel 2013 users skip this step)
 Then select Format only unique or duplicate values
 Ensure duplicate is selected in the next menu, and choose a formatting option for the cells containing duplicates. Notice that the cells with duplicates now have the formatting you selected.
 Click OK
 Filter the worksheet to show only the records that are duplicates
1.With any single cell selected, click the Data tab in the Ribbon, and click the Filter button
2. Open the Filter menu for the Student Number column
3. In the Filter window, open the By Color menu and select the color you chose to apply to the duplicate values
4. Close the Filter window – Only the duplicate records appear now
 Sort the worksheet by Student Number so the duplicates appear next to each other
1. With a single cell in the Student Number column selected, click the Data tab in the Ribbon
2. Click the Sort Ascending button
 Delete one of each of the duplicate records
 Clear and remove the filter by clicking the Filter button in the Ribbon
Using Text Functions
Some functions in Excel typically apply to cells containing text strings, while others typically apply to cells containing numerical values. In most cases, Excel considers a cell’s value a text string if it contains at least one letter. Examples include names, addresses, and usernames. While you can’t perform mathematical operations on text strings, there are many ways you can reformat, add to, or extract information from them.
After entering a formula into a cell, apply it to the rest of a column using Autofill. Autofill enters the formula into the selected cells, and updates any cell references. To use Autofill, select the cell with the formula to be copied. Then move your cursor to the lowerright corner of the cell so it turns into a black + sign. Click and drag down the column, or doubleclick to autofill the formula down to the last populated row.
Also, there may be times when you want to include a string of text as part of a formula. Put the text in quotes to refer to the text as you’ve typed it, rather than having it be part of a cell reference or other operation. This is useful when you want to insert specific text into the same place in multiple cells, or you want a string of text considered as an argument in a formula.
First, explore the CONCATENATE function. The Concatenate function is one of the most common and useful functions in Excel. So much so, in fact, that there’s a shorthand way of writing it: use an ampersand.
Concatenate, or the ampersand, merges the contents of multiple cells together into one. This is not a mathematical operation, so if you use it on cells containing numbers, you’ll get one larger number consisting of the smaller numbers pasted together.
This function can be useful for many tasks, from merging teacher comments or test scores to creating usernames and passwords from users’ personal information.
Interaction 4 – Slides
Review how to use the CONCATENATE function and text in quotes. Click to view slide(s).
Activity 4 – Using Concatenate to Combine Data and Add Text to Create New Data Sets
Use teachers’ first and last names to create teacher email addresses in the format Deborah.Davis@aghs.org.
 On the Teacher Info worksheet, in the first cell under the Email heading, enter an = sign to start the formula
 Enter the first cell that you want to combine to create the email address:
=D2
 Enter an ampersand & to concatenate one string with another:
=D2&
 Since you need a period between the first and last names, enter ”.” after the ampersand:
=D2&”.”
The quotation marks tell Excel to consider the text between them as a string on its own rather than using the text as part of a cell reference or other operation.
 Add another ampersand, and then enter your next cell reference, C2:
=D2&”.”&C2
 Add another ampersand and the email domain information, remembering to put the text in quotes:
=D2&”.”&C2&”@aghs.org”
 Press Enter
 Autofill the formula down the column by placing your cursor in the bottomright corner of the cell you entered the formula into so it turns to a black + sign, then clicking and dragging down the column to the last row of data
Alternatively, you can autofill by doubleclicking when the cursor turns into a black plus sign. Excel will then autofill the formula down to the last row of data for you. For this activity, this method will work for Excel 2013 users, but Excel 2016 requires that the column to the left of the one to be autofilled be populated, so it will not work here (but will work for the next activities).
Activity 5 – Using The Left and Lower Functions
The LEFT function returns a string of characters from a cell, starting from the first, or leftmost, character. The cell is determined by the first argument, and the number of characters is determined by the second argument.
The LOWER function changes any capital letters in a string of text to lowercase.
Interaction 5 – Slides
Review how to use the LEFT and LOWER functions. Click to view slide(s).
Use these functions to create usernames for teachers consisting of the first letter of their first names followed by their last names. Use the LEFT function to extract the proper information, and the LOWER function to change any capital letters to lowercase.
 On the Teacher Info worksheet, in the first cell under the Username heading, begin the LEFT function:
=LEFT(
 Enter the cell containing the teacher’s first name, D2, as the first argument, followed by a comma:
=LEFT(D2,
 Enter the number of characters you want to return, 1, as the second argument and end it with ):
=LEFT(D2,1)
 Insert the teacher’s last name by adding &C2 to the end of the formula:
=LEFT(D2,1)&C2
 To make all characters lowercase, wrap your formula in the LOWER function:
=LOWER(LEFT(D2,1)&C2)
 Press Enter, then autofill the formula down the column
Activity 6 – Using The Mid Function
The MID function returns a certain number of characters, starting from a certain position, from a specified cell. The first argument in the function is the cell you want to pull the characters from. The second argument is the position in the cell that you want to start pulling from. The third argument is the number of characters you want returned.
Interaction 6 – Slides
eview how to use the MID function. Click to view slide(s).
Use the MID function to create passwords for the teachers in your worksheet. The passwords should consist of the first letter of the teacher’s last name followed by the teacher number, minus the leading “10.”
 On the Teacher Info worksheet, in the first cell under the Passwords heading, begin your formula with a LEFT function that will return the first letter of the teacher’s last name, followed by an ampersand:
=LEFT(C2,1)&
 Next, enter the start of a MID function:
=LEFT(C2,1)&MID(
 Enter the cell containing the teacher number, A2, as the first argument, followed by a comma:
=LEFT(C2,1)&MID(A2,
 Enter the position within the cell of the start of the string you want to extract, 4, as the second argument, followed by a comma:
=LEFT(C2,1)&MID(A2,4,
 Enter the number of characters you want to extract, 5, as the third argument, and end it with ):
=LEFT(C2,1)&MID(A2,4,5)
 Press Enter, then autofill the formula down the column
Activity 7 – Using The Right Function
The RIGHT function is similar to the LEFT function, but it returns a number of characters from the last, or rightmost, character.
Use the Right function to extract science scores that are embedded as the last two characters in state exam scores.
Note that since the RIGHT function is a text function, Excel will treat the value that gets returned as text. In a later activity you’ll perform some mathematical operations on these values, so you’ll have to take an extra step to make Excel consider the value as numeric.
 On the State Exam worksheet, in the first cell under the Science Score heading, begin the RIGHT function:
=RIGHT(
 Enter the cell containing the state exam score, G2, as the first argument, followed by a comma:
=RIGHT(G2,
 Enter the number of characters you want to return, 2, as the second argument and end the formula with ):
=RIGHT(G2,2)
 Press Enter, then autofill the formula down the column
 Use what you’ve learned about the LEFT and MID functions to extract the first two characters into the Math Score column, and the third and fourth characters into the English Score column
Since the RIGHT, LEFT, and MID functions are text functions, complete an extra step to make Excel consider the returned values as numeric. There are two ways to do this:
 Nest your text function in a VALUE function. The VALUE function converts a text string that represents a number to a number.
 Perform a mathematical operation on the result of the function that won’t change the value, such as adding 0, multiplying by 1, or inserting two negative signs in front of the function name (effectively multiplying the value by negative 1 twice)
 Use either method listed above to convert the values in the Math Score, English Score, and Science Score columns to numerical values
For example, the first cell under the Science Score heading could contain one of the following formulas:
=VALUE(RIGHT(G2,2)) =RIGHT(G2,2)+0 =RIGHT(G2,2)*1 =–RIGHT(G2,2)
Activity 8 – Using The Len Function
The LEN, or LENGTH, function returns the number of characters in a cell. This function is useful if you need to know which cells contain the least or most characters, or which cells contain fewer or more than a certain number of characters.
Interaction 7 – Slides
Review how to use the LEN function. Click to view slide(s).
Your district is now limiting the number of characters allowed for course names to 20. Use the LEN formula to determine which courses will need to have their names shortened.
 Open the Course Names worksheet
 In the first cell under the Length of Course Name heading, begin the LEN function:
=LEN(  Enter the cell number for the course name, A2, and end with ):
=LEN(A2)  Press Enter
 Autofill the formula down the column
 Sort the data by the “Length of Course Name” column in descending order
1. Click the box just above the row numbers to highlight all the cells on the worksheet
2. Click the Data tab in the ribbon
3. Click Sort
4. In the menu under Column, select Length of Course Name
5. In the menu under Order, select Largest to Smallest
6. Make sure “My list has headers” is selected, and click OK
How many courses have names longer than the 20character maximum?
Activity 9 – Using the Find Function
The FIND function returns the starting position of a text string in a cell. The first argument is the string you want to search for. This can be a cell that contains your search term, or you can enter the search term in quotes to define the term in the formula. The second argument is the cell to be searched. The third argument is the position in the cell that you want the search to start. If you leave this argument out, the search will start at the first position in the cell.
The FIND function is case sensitive, so it’s important to ensure that your search term uses capital and lowercase letters in the same way as the text you search.
Interaction 8 – Slides
Review how to use the FIND function. Click to view slide(s).
Since the FIND function returns a position in a cell, it’s commonly used in other formulas.
For this activity, imagine you need to extract just the street numbers from students’ addresses. Use the FIND function to get the required information.
 Switch to the Student Info worksheet
 In the first cell under the Street Number heading, start the formula:
=FIND(
 Enter your search term in quotes as the first argument; since all the street numbers are followed by a space, enter ” “:
=FIND(” “
 Now add a comma and enter the cell to be searched, D2, followed by a closed parenthesis:
=FIND(” “,D2)
 Use your FIND function as the second argument in a LEFT function to return the text in the address column up through the first space:
=LEFT(D2,FIND(” “,D2))
 To keep the space from being returned as well, add 1 after the FIND function:
=LEFT(D2,FIND(” “,D2)1)
Since the FIND function returns a number, you can use mathematical operations on it and subtract it by 1.
 Press Enter, then autofill the formula down the column
Using Date Functions
The next set of functions and formulas pertain to date data. Like text, elements can be extracted from dates, but unlike text, dates can be altered with mathematical operations.
Activity 10 – Using the The Month, Day, and Year Functions
The YEAR, MONTH, and DAY functions all work in a similar way. They return the year, month, or day of a date. In order for them to return valid values, the arguments must point to a date.
Interaction 9 – Slides
Review how to use the MONTH, DAY, and YEAR functions. Click to view slide(s).
Split students’ dates of birth into separate columns using the MONTH, DAY, and YEAR functions.
 Make sure you’re still on the Student Info worksheet
 In the first cell under the Birth Month heading, enter:
=MONTH()
 Enter the cell containing the student’s date of birth as the argument, F2:
=MONTH(F2)
 Press Enter, then autofill the formula down the column
 The DAY function is similar to the MONTH function, so in the first data cell in the Birth Day column, enter:
=DAY(F2)
 Press Enter, then autofill the formula down the column
 Enter the YEAR function in the Birth Year column:
=YEAR(F2)
 Press Enter, then autofill the formula down the column
Activity 11 – Using The DATEDIF and TODAY Functions
The DATEDIF formula returns the difference between two dates. The first argument is the earlier date. The second argument is the later date. The interval of time in which the result is shown is determined by the third argument. See the table at the end of this course material for the interval options.
The TODAY function returns today’s date, and doesn’t require an argument between the parentheses.
Interaction 10 – Slides
Review how to use the DATEDIF and TODAY functions. Click to view slide(s).
Use students’ dates of birth, as well as today’s date, to determine their current ages using the DATEDIF and TODAY functions.
 On the Student Info worksheet, in the first cell under the Current Age heading, enter:
=DATEDIF(
 The earlier date is the student’s date of birth, so enter F2 as the first argument, followed by a comma:
=DATEDIF(F2,
 Use today’s date as the second argument by entering the TODAY function, followed by a comma:
=DATEDIF(F2,TODAY(),
 Since you want the student’s age to appear in years, enter “y” as the third argument, followed by a ):
=DATEDIF(F2,TODAY(),”y”)
For the other intervals available, see the list of functions at the end of this course material.
Press Enter, then autofill the formula down the column
Activity 12 – Using The Date Function
The DATE function returns a date. The year, month, and day of the date returned are determined by the three arguments in the formula. The DATE function is often used along with the YEAR, MONTH, or DAY functions to pull elements from other dates and create new ones.
Interaction 11 – Slides
Review how to use the DATE function. Click to view slide(s).
Determine the date that students will turn 16 and become eligible for Driver’s Education using the Date function.
 On the Student Info worksheet, in the first cell under the Date Eligible for Driver’s Ed heading, enter:
=DATE(
 Enter the YEAR, MONTH, and DAY functions as the arguments for the DATE formula, followed by a ):
=DATE(YEAR(F2),MONTH(F2),DAY(F2))
 Students become eligible for Driver’s Ed when they turn 16, so add 16 to the year in your formula:
=DATE(YEAR(F2)+16,MONTH(F2),DAY(F2))
 Press Enter, then autofill the formula down the column
Activity 13 – Combining The DATEDIF and DATE Functions
Use the DATEDIF and DATE functions together to determine students’ ages on the first day of school. Assume the first day of school is September 1, 2015.
 On the Student Info worksheet, in the first cell under the “Age on first day of school” heading, enter:
=DATEDIF(
 The earlier date is the student’s date of birth, so enter F2 as the first argument, followed by a comma:
=DATEDIF(F2,
 To use the date of the first day of school as the second argument, enter a DATE function with the first day’s year, month, and day as its arguments, followed by a comma:
=DATEDIF(F2,DATE(2015,9,1),
 Since you want the student’s age to appear in years, enter ”y” as the third argument of the DATEDIF function, followed by a ):
=DATEDIF(F2,DATE(2015,9,1),”y”)
 Press Enter, then autofill the formula down the column