EXCEL ADVANCED 2016 Alexandria Technical and Community College Customized Training Technology Specialist 1601 Jefferson Street, Alexandria, MN 56308 320-762-4539 Linda Muchow lindac@alextech.edu
1
Table of Contents IF Statement... 3 IF AND OR... 4 Nested IF Statement... 5 VLOOKUP... 5 Intermediate Charting... 6 Protecting your Files & Worksheets... 8 Password Protect your Entire File... 8 Linking Data... 8 Edit Links... 9 Select Blank Cells... 9 Multiple Arithmetic Operators... 10 Data Validation... 11 Filtering... 12 Subtotals... 12 Conditional Formatting... 13 Creating a Table... 14 Add a Total Row... 14 PivotTables & PivotCharts... 15 Creating a PivotTable... 15 Pivot Tables What s Next!... 16 Show Values % of Grand Total... 16 Show Values Difference From... 16 Running Total... 17 To add a calculated field... 17 Timelines in PivotTables... 18 Slicers in PivotTables... 18 Create a PivotChart... 19 Data Model... 19 2
IF Statement The Excel IF Function returns one value if a specified condition evaluate to TRUE, or another value if it evaluates to FALSE. In this example, each employee received a Job rating with 1 being the worst rating and 5 being the best rating. Each employee that has a job rating of 4 or 5 will receive a $250 bonus. The IF function can run the logical reference (greater than 3) and put the number 250 in each cell that meets that requirement. If the job rating is less than 4, the IF statement will put a 0 in the cell. 1. From the Formulas Tab >> Function Library select Logical and then IF. 2. The Function Arguments window should be filled out as sown below. 3
3. Use the AutoFill handle to copy the function. IF AND OR =IF(AND(D2>5,C2>10000),2,1) Salespeople who have been employed for more than 5 years AND have sales of greater than $10,000 should be assigned a job level of 2, all others should have a job level of 1. IF(OR(D2>5,C2>10000),2,1) Sales people who have been employed for more than 5 years or have sales of greater than $10,000 should be assigned a job level of 2, all others should have a job level of 1. 4
NESTED IF STATEMENT Sales people who have sales of 40,000 or greater are a level 3, $10,000 or greater are a level 2, the rest are a level 1. VLOOKUP There are a number of Excel functions that you can use to look up and return information within a table. The most popular function for most users is VLOOKUP, which searches the first column of a range of cells and then returns a value from any cell on the same row. The inherent limitation of VLOOKUP is that whatever value you want to return must be to the right of that first search row. =VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup]) In this example we are using the Code in column B as the lookup value. Our table array is an absolute reference to cells F3:H6. Column F provides the lookup reference in the left most column of the table array, referred to as column 1. Column G, referred to as column 2, will return the product name. Column H, referred to as column 3, will return the product price. 5
Intermediate Charting Charting Non-Adjacent Data Select the first range of data. Hold down the Ctrl key as you drag to select the additional range(s). Be sure to include headings in the selection! Adjusting Scale 1. Double click the Axis you want to change. A Format Axis task pane will open on the right hand side of your screen. 2. Enter new Minimum, Maximum and Units which are all scale increments. Add a Trendline 1. Right mouse click the data series you want to add a trend line to. OR select the data series and then click the Chart Element button and make your selection from there. 2. You can select Linear, Exponential, Linear Forecast, or Two Period Moving Average. 3. The Trendline will be assigned. Charting Keyboard Shortcuts F11 inserts a default chart into a separate worksheet. Alt+F1 embeds a default chart into your current worksheet. 6
Creating a chart with two Scales 1. Select your data. From the Insert Tab, Charts Section. Select Combo chart and make a selection from there. Adding Data Labels 1. Select the Chart. 2. From the Chart elements button select data labels and then select where you would like them placed. 7
Protecting your Files & Worksheets Protecting / Unprotecting Worksheets Protecting a worksheet prevents editing of cells (unless they are unlocked), and can also prevent other commands from being used. 1. Turn on protection by choosing Review >> Protect sheet. Select specific actions to permit. A password is optional. 2. To unprotect, choose Review >> Unprotect Sheet. Enter the password if prompted PASSWORD PROTECT YOUR ENTIRE FILE 1. Click the File Tab, select Save As >> Browse 2. From the Save As window, click the Tool dropdown in the lower right hand corner. 3. Choose General Options. 4. You can provide a password to open the file, modify the file or both. Linking Data Linking allows data stored on a worksheet to be referenced by another worksheet. This can be within the same workbook, or in separate workbooks. Linking worksheets 1. Open the file containing worksheets that you want to link together. 2. Copy the cell you wish to link to another worksheet. 3. Switch to that worksheet and select the desired cell. 4. Right mouse click select Paste Special 5. Select the Paste Link option. If the data is changed for a source cell, it is automatically updated in the destination cell, provided the changes to the source are saved. 8
EDIT LINKS One file could be linked to one or more other files through formulae. During the course of time, as these workbooks get updated / changed, there could be a need to change the links in these workbooks. Changing the source link allows the user to change the location of the source where the data exists or to change the link to a new workbook altogether. To change the source link you have to use the Edit Links option. This option gives the user a view of all the other files the current file is linked to, so that the user can update or remove the links. 1. From the Data Tab select Edit Links. 2. This window allows you to Change the source, open the source, break the link or check the status. Select Blank Cells 1. Select the data. Home Tab >> Find & Select >> Go To Special (F5 >> Click Special). 2. Select the Blanks radio button. 9
Multiple Arithmetic Operators Many formulas that you create in Excel 2016 perform multiple operations. Excel follows the order of operation when performing each calculation. You can use parentheses to change the order of operations, even nesting sets of parentheses within each other. Order of Operation Arithmetic Operator Excel Symbol Please Parentheses () Excuse Exponents ^ My Multiplication * Dear Division / Aunt Addition + Sally Subtraction - Multiplication and division pull more weight than addition and subtraction and, therefore, are performed first, even if these operations don t come first in the formula (when reading from left to right). Consider the series of operations in the following formula: =H10+H11*G12 This formula multiplies H11*G12 (650*20%) THEN adds H10 (525) =(H10+H11)*G12 This formula performs the calculation within the parentheses first H10+H11 (525+650) THEN multiplies it by G12 (20%). 10
Data Validation To limit entry to a list of values: 1. Ahead of time, enter the possible values on the same worksheet but far away from anywhere that will contain values or be subjected to possible deletion. 2. Click in the cell(s) where you want to control what gets entered. 3. Select Data ribbon > Data Tools group > Data Validation 4. On the Settings tab, select List under Allow: 5. Enter or select the source for possible responses. 6. Under Input Message, you can provide a prompt to assist during data entry: 7. Under Error Alert, you can provide remedial support to encourage the correct selection. You can also choose the make the error only a warning instead of refusing to take their value. 8. Click on OK to finalize your choices. To restrict entry to other specific types: At times it s useful to set cells to only accept certain kinds of information. These are things such as whole numbers, decimals, and dates. 1. Click in the cell(s) where you want to control what gets entered 2. Select Data ribbon > Data Tools group > Data Validation 11
Filtering You can filter to select records that match specific criteria. This gives a temporary view of data without physically removing anything. To isolate individuals from Florida, we would do the following: 1. Click in a cell where headings are in row 1 2. Choose Data ribbon > Sort & Filter group > Filter 3. Select specific criteria In the corresponding drop-down 4. To remove the filter, click the Filter Button SUBTOTALS 1. Sort the list on the field for which you want subtotals inserted. 2. From the Data tab, in the Outline group, select Subtotal. 3. Select the field for which the subtotals are to be calculated in the At Each Change in dropdown. 4. Specify the types of totals you want to insert in the Use Function dropdown. 5. Select the check boxes for the field(s) you want to total in the Add Subtotal To list box. 6. Click OK. 12
Conditional Formatting Excel provides automated means to visually alter the appearance of cells based on analysis of their contents. This can involve changing background or font colors, or even displaying meaningful icons. Conditional formatting can be implemented in multiple ways, and we will examine a few of them. Additional ways to use this functionality can be found in Microsoft Office Excel Help, or by searching the Internet for methods that may suit your specific purposes. To access this area: Home ribbon > Styles group > Conditional Formatting Icon Sets These can be used to show pictorial representations in a range of associated cells to graphically show comparative levels among them. Simply select the range and an icon set. Color Scales These depict a gradient type of effect within a range of cells. To use this functionality, select a desired range and chose a color scale: Highlight Duplicates Use conditional formatting to find and highlight duplicate data. That way you can review the duplicates and decide if you want to remove them. 13
Creating a Table There are two ways to create a table. You can either insert a table directly in the default table style or you can convert an existing range into a table. The second approach is by far the most common: 1. On a worksheet, click anywhere in your list of information. 2. On the Home tab, within the Styles group, select Format at Table. 3. A Create Table dialog box will appear. Your selected range appears as an absolute cell reference. Your range will already be selected and displayed in the Where is the data for your table? 4. If your selected range contains data that you want to display as table headers, select the My table has headers check box. 5. Click the OK command button to create the table. 6. When you have an Excel table selected, you will have access to a Table Tools contextual tab with a single Design sub-tab. Each time you create a table, Excel creates a default table name in the Properties group (e.g., Table1, Table2, etc.). The scope of the table name is for the entire workbook. ADD A TOTAL ROW 1. Click anywhere in the table 2. On the Design Tab, within the Table Style Options group, select Total Row check box. The total row appears as the last row in the table and displays the word Total in the left most cell. 3. In the total row, click the cell in the column for which you want to calculate a total, and then click the dropdown that appears. 4. In the dropdown list, select the function that you want to use to calculate the total. 14
PivotTables & PivotCharts A PivotTable interactively allows for quickly summarizing large amounts of data. You can rotate its rows and columns to see different summaries of the source data, filter the data by displaying different pages, or display the details for areas of interest. PivotCharts are associated with PivotTables and provide graphical representations of the same information. Use a PivotTable when you want to compare related totals, especially when you have a long list of figures to summarize and you want to compare several facts about each figure. Because a PivotTable is interactive, you can change the view of the data to see more details or calculate different summaries. This gives a customized perspective on the data without having to change anything in the range of cells it is based on. CREATING A PIVOTTABLE 1. Click a cell in the range of cells that contains the data you want to make a PivotTable out of. 2. From the Insert Tab, within the Tables group, click PivotTable. 3. Click OK. Excel adds an empty PivotTable report to a new worksheet. 4. To add fields to the report, click and hold the field name in the field section, and then drag it to an area in the layout section. Fields you put in the different layout section are as follows: 1. Report Filters: filters are shown at the top-level report above the PivotTable and will filter the entire table at once. 2. Column Labels: are shown in column layout (horizontal) at the top of the PivotTable. 3. Row Labels: are shown in Row layout (vertical) on the left side of the PivotTable. 4. Values: are shown as summarized numeric values. 15
Pivot Tables What s Next! SHOW VALUES % OF GRAND TOTAL 1. First select one of the Total values that you wish to display as a percentage of the Grand Total and Right Mouse Click. 2. Select Show Value As >> % of Grand Total SHOW VALUES DIFFERENCE FROM 1. First select one of the Total values you wish to display as values from difference and Right Mouse Click. 2. Select Show Values As >> Difference From. In this example the Base field is the Building. The Base Item is the Building named North. 3. Click Ok. Results are displayed. 4. To clear the results. Right mouse click an amount. Select Show Values As >> No Calculation. 16
RUNNING TOTAL 1. Right mouse click a cell within the total column. Select Show Values As>>Running Total In 2. Select the Base Field. In this example we will show values as a running total by Building. 3. Click OK. TO ADD A CALCULATED FIELD 1. Select a cell in the pivot table, and on the Excel Ribbon, under the PivotTable Tools tab, click the Options tab. 2. From the Calculations group, Select Fields, Items, & Sets >> Calculated Field. 3. Type a name for the calculated field, for example, 15% increase 4. In the Formula box, delete everything but the equal sign (=). Double click a field from the Field list. And add any arithmetic operators and numbers to complete your formula. This formula is going to multiply the salary amount by 1.15. 5. Click Add to save the calculated field, and click Close. The field appears in the Values area of the pivot table, and in the field list in the PivotTable Field List. 17
TIMELINES IN PIVOTTABLES You can now insert a Timeline in a PivotTable as long as you have date fields to work with! SLICERS IN PIVOTTABLES Slicers allow you to quickly filter PivotTables and Charts. 1. Select Analyze >> Filter Group >> Insert Slicer. 2. Select the fields you wish to filter by. Click OK. 3. The slicers will be added. Simply select the items you wish to see. Hold down the ctrl key to select multiple items at once. Notice the Clear Filter button in the upper right corner of each slicer. 18
4. New to 2016 you can select Multi Select to remove several items at once. CREATE A PIVOTCHART 1. Select any cell in your PivotTable 2. From the PivotTable Tools Analyze Tab select PivotChart from Tools group. You can also use the Insert Tab >> Charts >> PivotChart 3. The insert chart dialog box will appear. Select the desired chart type and layout, then click OK. Data Model 1. Convert data to tables a. Insert Tab >> Table b. Use the Table Tools Design Tab >> Properties Group >> and name the table 2. Create the Relationship 19
a. Data Tab >> Data Tools Group >> Relationships b. Click New. c. You will relate your two tables by the common field in this window. 3. Create a PivotTable a. Insert Tab >> PivotTable b. Currently, only one table is being displayed. Click MORE TABLES c. Click Yes to create a New PivotTable based off of the data model. Both of your tables will now be listed. 4. Drill down feature will allow you to drill into either of the tables. 20