# CBN Advanced Excel Training Slide.pptx

31 May 2023
1 sur 301

### CBN Advanced Excel Training Slide.pptx

• 1. BY PINORISING CONSULT CAPACITY BUILDING ON INTERMEDIATE MICROSOFT EXCEL
• 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
• 4. LECTURE 1 Basic Excel Refresh and Designing Better Spreadsheet
• 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
• 8. How To Enter Data 2 8
• 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
• 10. How To Navigate Through Excel Sheet 2 10
• 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
• 15. Creating Formulas using Constants and Operators 2 15
• 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
• 30. Charts offered by Excel 2 30
• 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
• 50. End of Lecture 1 Thank You
• 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.
• 89. End of Lecture 2 Thank You
• 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
• 94. Financial Functions • Investment Value Functions • FV • NPV • PV • Payment Functions • PMT • Interest Rate Functions • RATE • Internal Rate of Return Functions • IRR
• 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
• 98. Answer is… Rate =5%/12 Nper =60 Pmt =-1000 Excel financial function is, =FV( 5%/12, 60, -1000 ) =\$68,006.08
• 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=…………..?
• 100. Answer is… Rate =10%4 Nper =16 Pmt =-2000 Pv =0 Type=1 Excel financial function is, =FV( 10%/4, 16, -2000, 0, 1) =\$39,729.46
• 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]=…………….?
• 110. Answer is… Rate =5%/12 Nper =60 Pmt =1000 Excel financial function is, =PV( 5%/12, 60, 1000 ) =-\$52,990.71
• 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
• 116. Answer is… Rate = 5%/12 Nper = 60 Pv = 50000 Excel financial function is, =PMT( 5%/12, 60, 50000 ) =-943.56
• 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
• 118. Rate = 3.5%/4 Nper = 8 Pv = 5000 [Fv] = 0 [Type] = 1 Excel financial function is, =PMT( 3.5%/4, 8, 0, 5000, 1 ) =-600.85 Answer is…
• 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
• 122. Answer is… Nper = 60 Pmt = -1000 pv = 50000 [Fv] = [Type] = [Guess] = Excel financial function is, =RATE( 60, -1000, 50000 ) =0.62% Yearly Interest Rate: =12*rate =7.42%
• 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]=……….?
• 124. Answer is… Nper = 24 Pmt = -800 pv = 20000 [Fv] = 0 [Type] = 1 [Guess] = Excel financial function is, =RATE( 24, -800, 0, 20000, 1 ) =0.33% Yearly Interest Rate: =12*rate =3.90%
• 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
• 129. End of Lecture 3 Thank You
• 132. LECTURE 4 OBJECTIVES •Understanding data Lookup Functions •Using Choose •Using Lookup •Using Lookup for Matches •Using H-Lookup •Using V-Lookup •Using Indef •Using Match function
• 133. LECTURE 4 OBJECTIVES Cont’d •Understanding Reference Functions •Using Row and Rows •Using Column and Columns •Using Address, Indirect, Offset
• 134. Microsoft Excel 2010 - Level 3 UNDERSTANDING DATA LOOKUP FUNCTIONS 1 Data lookup functions are used to retrieve data from a table. They generally require at least two pieces of information; what to look for and where to look for it. The what to look for part is often part of a table of information which can be referred to as a calculation area. The where to look for it is known as a data table – a table in which a list of rates, figures, text or other items are held. Data Area The data area is often on a worksheet by itself, protecting it from accidentally being modified or deleted. It holds all of the possible values for the data. The values are laid out in a table format and they are listed in numerical or alphabetical order of the code that the lookup function will search for. In this example, we have created the name Pay_Rates for the range B3:C7 that holds the data. The resulting formula in the calculation area will be easier to understand. 2 Calculation Area The calculation area is usually on a worksheet by itself unless you require the data values to be visible as well as the resulting calculations. The calculation area uses a formula, such as VLOOKUP, to find the correct data for each situation. In this example, the VLOOKUP function shown is comparing the value in C5 with the values in the range Pay_Rates. It then returns the value in the second column of the data table, determined by the 2 in the formula. The name Pay-Rates has been created as a quick way to reference the data table in the range B3:C7… The formula here takes the Pay Scale value in C5 (i.e. 2) and finds the corresponding row in the Pay_Rates table (i.e. B4). It then returns the value in the second column of the corresponding row of the Pay-Rates table, which in this case is \$30.00… © Watsonia Publishing Page 134
• 135. USING CHOOSE The CHOOSE function is designed to allow you to make a choice from a list of items. It takes the format of CHOOSE(lookup-value, list of items) where the lookup-value indicates the position in Open File Try This Yourself: Before starting this exercise you MUST open the file E831 Lookup Functions_1.xlsx...    Click on the drop-arrow of the Name Box and click on Rate_1 The hourly payroll rates have been placed on the Payroll Tables worksheet and each rate has been given a separate name… Click on C4 to see that the second rate has been named Rate_2 Click on the Payroll worksheet tab, then click on D5 We’ll use CHOOSE to look up the pay rate… Type =CHOOSE(C5,Rate_1, Rate_2,Rate_3,Rate_4,Rate_5) Press    Click on D5, then copy the formula down the list by double- clicking on the fill handle in the bottom right-hand corner of the cell The hourly rates and the resulting calculated gross pay are now complete For Your Reference… CHOOSE(index_num,value1,value2,...) This function selects a number, cell reference, defined name, formula, function, or text from a list of up to 254 different options. The index_num indicates which of the values to select, based on their position in the list. Handy to Know…  When you set up a data area for the CHOOSE function, the labels or values to the left of the data play no particular role other than to describe the values listed. This is in contrast to other lookup functions which search the first column of a data table for a match. 1 6 the list of the item you want, that is, 1 being the first item in the list and so on. Range names are often used for the list items to make the function easier to read and comprehend. Note: As you type the formula, you will see the range names appear in a list below the formula. You can click on a name in the list and press to insert it, rather than typing each one… © Watsonia Publishing Page 135
• 136. Microsoft Excel 2010 - Level 3 USING VLOOKUP The classic lookup function is VLOOKUP – the vertical lookup. This function searches vertically down a sorted data table looking for a match with the lookup-value (or the next lowest value). It Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_2.xlsx...     Click on the drop arrow for the Name Box and select Tax_Table This is the data table for our VLOOKUP function… Click on the Payroll worksheet tab to return to the payroll table and click on G5 Type =VLOOKUP(F5,Tax_Table,2) Press 0% appears because the Gross Pay is less than \$500… Copy the formula in G5 to the range G6:G13 Enter the formula =F5*G5 in H5, then copy it to H6:H13 Enter the formula =F5-H5 in I5, then copy it to I6:I13 Click on C10      Type 2 and press For Your Reference… VLOOKUP(lookup_value,table,col_index_num) This function searches down the left-most column of the table until it finds the lookup-value or the row with the next lowest value. It then refers to the column index number nominated in the function, and returns the value found in the corresponding row and column. Handy to Know…  An alternative to the VLOOKUP function is the horizontal or HLOOKUP function. This looks for a value in the top row of a table or array of values, and returns the value from the same column in the row you specify. 1 4 then looks across the table to the column you have specified to find the value to return. This is ideal for looking up numeric values within a range, such as tax rates, or commission amounts. The change in the Pay Scale results in changes to the Hourly Rate, Gross Pay, Tax Rate, Tax and Net Pay for Alana Keane 9 © Watsonia Publishing Page 136
• 137. Microsoft Excel 2010 - Level 3 USING VLOOKUP FOR EXACT MATCHES Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_3.xlsx...  Click on the drop arrow for Name Box and click on Items_List This lookup table includes       specific product codes that require an exact match… Click on the Invoice worksheet tab, then click on C7 We’ll use the exact lookup to find the description… Type =VLOOKUP (B7,Items_List,2,FALSE) Click on E7, type =VLOOKUP(B7,Items_List,3, FALSE), then press We only want to charge a deposit if B3 is not blank… Click on F7, type =IF(ISBLANK(\$B\$3),0, VLOOKUP(B7,Items_List,4, FALSE)), then press Click on G7, type =(D7*E7)*(1- F7), then press Copy the formulas in columns C, E, F and G down to Row 10 to complete the invoice as shown For Your Reference… To use VLOOKUP for exact matching: VLOOKUP(lookup_value,table,col,range_lkup) Use the value of FALSE for range_lkup when you want to ensure exact matches only. #NA will be returned if an exact match isn’t found. Handy to Know…  You can use the ISNA(value) function to trap #NA results. For example, the structure =IF(ISNA(lookup),”Code not found”,lookup) will display a useful message when an exact match is not possible, rather than #NA which does not explain the problem clearly. 3 6 Generally, the VLOOKUP function uses three arguments: the lookup-value, the table location and the column number. This lookup will find a row based on a numeric range. However, you may only want to return a value if you get an exact match, and the optional fourth argument, match- type, makes this possible. By adding FALSE to the function, #NA is returned if a match isn’t found. 7 © Watsonia Publishing Page 137
• 138. Microsoft Excel 2010 - Level 3 USING HLOOKUP Another commonly used lookup function is HLOOKUP – the horizontal lookup. This function searches horizontally across a sorted data table looking for a match with the lookup- Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_4.xlsx...    Click on the Index worksheet tab then click on D14 and examine the formula This is an example of the VLOOKUP function. This scans down the list of options looking for the corresponding Equipment number. When it finds a match, it returns the description. You can use HLOOKUP in a similar way… Click on cell D15 and type =HLOOKUP(C15,Rate_Type, 2,TRUE) Press  The name of the Rate Type will be returned and displayed… Experiment with different values in cells C14 and C15 You’ll find that the formulas return the corresponding descriptions For Your Reference… HLOOKUP(lookup_value,table,row_index_num) This function searches across the top-most column of the table until it finds the lookup_value or the row with the next lowest value. It then refers to the row index number nominated in the function, and returns the value found in the same column and corresponding row. Handy to Know…  If the lookup_value is smaller than the smallest value in the first row of table, HLOOKUP will return the #N/A error value.  Range_lookup is an optional argument. If TRUE or omitted, it will find the closest match in the top row. FALSE forces an exact match. 1 3 value (or the next lowest value). It then looks down the table to the row you have specified to find the value to return. This can be used to search for text, numbers, or logical values. © Watsonia Publishing Page 138
• 139. Microsoft Excel 2010 - Level 3 USING INDEX The INDEX function is used to look up values according to specific row and column locations. The function requires the location of the lookup table, and the row and column to look in. This is Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_5.xlsx...    Click on the drop arrow for the Name Box and click on Rate_List This will take you to the lookup table which shows the various hire rates for communications equipment… Click on C18 and type =INDEX(Rate_List,C14,C15) Press   This will vary depending upon which figures appear in C14 and C15... Click on C19, type =C16*C18, then press The function has looked up the figure for the equipment type for the rate, and has returned the value. The total multiplies the number of days hire by the hire rate to give the Total Hire cost… Click on C14, type 1, then press The value returned is that for equipment type 1 with the given rate type For Your Reference… INDEX(array,row,column) This function goes to the table at the array or range specified and returns the value found in the specific row and column of the table. Handy to Know…  The INDEX function can also be used for multiple tables, where it takes the form: INDEX(reference,row,column,area)  Here reference refers to one or more ranges, and area refers to which of these ranges to look in for the value. 2 4 especially useful for two-dimensional tables where you want the lookup values to be visible. For example, you may want alternative prices to be visible with your price calculator. 5 © Watsonia Publishing Page 139
• 140. Microsoft Excel 2010 - Level 3 USING MATCH The MATCH function looks for an item in a list and returns the position of that item. MATCH is used instead of the other lookup functions when the position of the item rather than the item itself Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_6.xlsx...  On the Index worksheet, click on C18 and examine the formula At the moment, the formula uses the Rate Type in C15 to determine which column to look in. Using MATCH you can allow the user to type the rate name rather than a number... Click on cell C15 and type Staff, then press and delete the contents of D15 which will display an error Click on C18, then double-click on C15 in the formula to select it – we’ll replace it with the MATCH function Type MATCH(C15,C4:F4)     Press The formula looks up the text and returns its position, which is 4 in this case. This is, in turn, used by the INDEX function to locate the correct hire rate for the given rate type For Your Reference… MATCH(lookup_value,table,match_type) This function searches through the table until it finds the lookup_value or the row with the next lowest value. It then returns the position of the value in the array. Match_type can be 1 (find value less than or equal to lookup_value), 0 (exact match) or -1 (value greater than or equal to). Handy to Know…  When MATCH searches for a text value, it expects to find the list in alphabetical order. If it doesn’t find an exact match in the alphabetical search, it will return the position of the word that would have appeared alphabetically before it in the list. This can be varied by changing match-type. 3 4 is needed. For example, you can search for a particular category name in an alphabetical list and return its location in the list, such as 3 for the 3rd position or 4 for the 4th position. 5 © Watsonia Publishing Page 140
• 142. Microsoft Excel 2010 - Level 3 USING ROW AND ROWS The ROW function returns the row number of a reference. The ROWS function, on the other hand, returns the number of rows in a reference. You can use ROW to create row numbering, or in Open File Try This Yourself: Before starting this exercise you MUST open the file E831 Lookup Functions_7.xlsx...    On the Addresses worksheet, click on A1, type =ROW() and press Click back on A1 then drag from the fill handle down to A9 This copies the formula down and gives you row numbering. What if you insert a row? Click on the row header for   row 5, then click on Insert , in the Cells group, on the Home tab The numbers automatically adjust... Copy the formula in A4 down to A5 to complete the numbering Click on A12 and type =ROWS(A1:A10), then press For Your Reference… ROW(reference) This function returns the row number of the reference. The reference is optional. ROWS(reference) This function returns the number of rows in the reference. Handy to Know…  The ROW and COLUMN functions are often used together to create a complete cell reference. 1 2 conjunction with other functions, such as ADDRESS, to construct cell addresses from information located in other parts of a spreadsheet. 3 5 This counts the number of rows in the range that you’ve specified, whether or not they have any contents © Watsonia Publishing Page 142
• 143. Microsoft Excel 2010 - Level 3 USING COLUMN AND COLUMNS Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_8.xlsx...    Click on B1 and type =COLUMN(), then press Click on B1, then drag the fill handle across to G1 to copy the formula Like rows, this returns the column number of the cell in which it resides... Click on B12 and type =COLUMNS(A1:G1), then press Excel counts 7 columns in this range For Your Reference… COLUMN(reference) This function returns the column number of the reference. The reference is optional. COLUMNS(reference) This function returns the number of columns in the reference. Handy to Know…  COLUMN() returns the column number rather than the letter that we would usually use to refer to a column. Excel is able to interpret this number via other formulas to work out which column to look in. 1 2 The COLUMN function returns the column number of a reference. The COLUMNS function, on the other hand, returns the number of columns in a reference. COLUMN can be used to create column numbering or used in conjunction with other functions, such as ADDRESS and INDIRECT, to enable access to specific cells in a worksheet. 3 © Watsonia Publishing Page 143
• 145. Microsoft Excel 2010 - Level 3 USING INDIRECT The INDIRECT function returns the reference specified by a text string. Often the text string is provided by the ADDRESS function or the ROW and COLUMN functions. When the reference is Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_10.xlsx...      Click on the INDIRECT worksheet tab and click on E3 This includes property prices as well as the maximum, minimum and median house prices. The list of sales prices is named Sales_Figures... Click on F3 and type =ADDRESS(MATCH( Top_Price,Sales_Figures,0) + ROW(B2),COLUMN(B2)) then press and click back on F3 This tells you that the top price is in \$B\$11. We need the property’s address which is in the cell one to the left... Click in front of ADDRESS in the formula and type INDIRECT( Press to move to the end of the formula, then edit as shown Press , then in F4 type =INDIRECT(ADDRESS(MATCH( Min_Price,Sales_Figures,0) + ROW(B2),COLUMN(B2)-1)) and press Now the address of the minimum price house is also visible For Your Reference… INDIRECT(ref_text) Retrieves the contents of the cell with the address ref_text. Handy to Know…  By default, INDIRECT expects an A1 format cell reference. To use a R1C1 style reference, use the optional parameter a1. For example, INDIRECT(“B3”,TRUE) and INDIRECT(“R3C2”, FALSE) will both return the contents of B3. 2 3 returned, the contents of the referenced cell are displayed. This means that INDIRECT is often used to retrieve the contents of a cell located by another function, such as the MAX or MIN. 4 5 © Watsonia Publishing Page 145 You need to type -1) in front of the last (closing) bracket
• 146. Microsoft Excel 2010 - Level 3 USING OFFSET The OFFSET function is used to retrieve a cell or range that is a specified number of rows and/or columns from a given cell or range of cells. It is great for locating information in a list when you Same File Try This Yourself: Continue using the previous file with this exercise, or open the file E831 Lookup Functions_11.xlsx...    Click on the OFFSET worksheet tab and click on F3 Type =OFFSET(INDIRECT( ADDRESS(MATCH( Max_Read,Readings,0)+ ROW(B3),COLUMN(B3))) ,0,-1) then press In F4 type =OFFSET(INDIRECT( ADDRESS(MATCH( Min_Read,Readings,0)+ ROW(B3),COLUMN(B3))) ,0,-1) then press For Your Reference… OFFSET(reference, rows, cols) This function goes to the cell reference, then moves down the number of rows and across the number of cols specified, then retrieves the data in the cell or range it locates. Handy to Know…  The additional optional parameters height and width determine how many cells are returned by the OFFSET function. For example, OFFSET(B3,2,1,2,2) will retrieve the range C5:D6. In this case, it is often used with SUM to calculate the total of these cells. 1 2 know where the data will be positioned in relation to other figures with a known location. OFFSET can return a single cell or a range of cells. 3 © Watsonia Publishing Page 146
• 147. End of Lecture 4 Thank You
• 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