View
1
Download
0
Category
Preview:
Citation preview
University Information Technology Services
Training, Outreach, Learning Technologies and Video Production
Using Excel 2011® at
Kennesaw State University Pivot Tables
VLOOKUP Function IF Function
2
Copyright© 2012 University Information Technology Services Kennesaw State University
This document may be downloaded, printed, or copied, for educational use, without further permission of the University Information Technology Services Department (UITS), provided the content is not modified and this statement is not removed. Any use not stated above requires the written consent of the UITS Department. The distribution of a copy of this document via the Internet or other electronic medium without the written permission of the UITS Department is expressly prohibited.
Published by Kennesaw State University The publisher makes no warranties as to the accuracy of the material contained in this document and therefore is not responsible for any damages or liabilities incurred from its use.
This document is an independent document and has not been authorized, sponsored, or otherwise approved by Apple®, Inc. or the Microsoft® Corporation.
Office 2011, Word, Excel, and PowerPoint are registered trademarks of the Microsoft Corporation.
Mac and Macintosh are registered trademarks of Apple, Inc.
3
Table of Contents
PivotTables .......................................................................................................................................... 5 VLOOKUP Function ........................................................................................................................... 13 IF Function ........................................................................................................................................ 17 Additional Support ............................................................................................................................ 19
4
Introduction
Office 2011® has been designed specifically for the Mac® computer. Each Mac at Kennesaw State University includes the following Office 2011 products: Word®, Excel®, and PowerPoint®. These packages will help you to develop useful documents, manage data, and create powerful presentations. This booklet, recommended for intermediate-‐level Macintosh® users, has been developed to help you understand Pivot Tables, the VLOOKUP Function, and the IF Function in Excel 2011.
Learning Objectives
The learning objectives in this document include:
• Understanding how to use Pivot Tables• Knowing how to use the VLOOKUP Function• Being able to use the IF Function
5
PivotTables A PivotTable is an excellent tool to analyze data. For example, suppose that you have the following spreadsheet that contains data about sales for your organization.
Figure 1 – Sales Data in a Spreadsheet
A PivotTable could be created for the spreadsheet above to help you to better analyze the numbers. The following explains how to create a PivotTable. 1. Click to select any cell that has data within the spreadsheet (see Figure 2).
Figure 2 – Select a Cell in the Spreadsheet
Select Any Cell
6
2. Click the Data tab (see Figure 3).
Figure 3 – Data Tab
3. Click the arrow next to the PivotTable button, which is located in the Analysis group (see Figure 4).
Figure 4 – Arrow for Pivot Table
4. In the menu that appears, select Create Manual PivotTable. 5. In the Create PivotTable window that appears, click New worksheet (see Figure 5). Then,
click the OK button.
Figure 5 – Creating a PivotTable in a New Worksheet
7
Figure 36 – Edit a Source
6. An empty PivotTable and the PivotTable Builder will appear on your screen (see Figure 6 and Figure 7).
Figure 6 – Empty PivotTable
Figure 7 – PivotTable Builder
8
7. You may now begin building your PivotTable. For example, if you wanted to see the total sales that each store has, you could do the following.
a. Drag Store to Row Labels (see Figure 8). b. Drag YTD Sales to Values (see Figure 9).
Figure 8 – PivotTable Builder Figure 9 – PivotTable Builder
This would result in a new sheet appearing as indicated in Figure 10.
Figure 10 – PivotTable Builder
9
8. Next, you may want to format the Total column. For example, you may want to make the numbers in the Total column appear as currency. To do this, allow your mouse pointer to hover over Sum of YTD Sales that is located in cell A3 (see Figure 11) and double-‐click.
Figure 11 – Formatting
9. The PivotTable Field window will appear on your screen. To format the numbers so that they appear as currency, click the Number button (see Figure 12).
Figure 12 – Formatting
10. The Format Cells window will appear on your screen. Under the Category column, select Currency. Then, click the OK button to close the window.
11. Next, in the PivotTable Field window, click the OK button. The formatting will be applied to the Total column.
10
12. Perhaps, you want to see other data in the PivotTable in addition to Totals. For example, you may want to see the Average sales for each store location. To display the Average for each store location, drag another YTD Sales field to the Values window (see Figure 13).
Figure 13 – PivotTable Builder
13. Double-‐click the column heading for the second column that appears on the spreadsheet (see Figure 14).
Figure 14 – Creating an Average Column
11
14. The PivotTable Field window will appear. To find the average, click Average as indicated in Figure 15.
Figure 15 – Finding the Average
15. To allow the numbers to appear as the Currency format, click the Number button (see Figure 16).
Figure 16 – Formatting
16. The Format Cells window will appear. Under Category, click Currency. Then, click the OK button to close the window.
17. For the PivotTable field window, click the OK button to close the window.
12
18. Another column will appear with the average sales for each store (see Figure 17).
Figure 17 – Finding the Average
19. To return to the worksheet containing the original data, click the Sheet1 tab in the lower-‐left area of the window (see Figure 18).
Figure 18 – Sheet1 and Sheet2 Tabs
13
VLOOKUP Function The VLOOKUP Function in Word 2011 is a great tool to use when you need to look up specific information in tables. The following explains how to use the VLOOKUP Function. 1. As an example, suppose that in Figure 19 we needed to find the letter grade for each
student. The VLOOKUP Function would be perfect for this situation.
Figure 19 – Student Grades
2. First, you would build your table in a remote location on your spreadsheet. Figure 20 shows an example of a table that can be used to determine the letter grade for students in the class.
Figure 20 – Student Grade Table
Figure 21 – Formula Builder Button
3. Click to select the location where you want the letter grade to appear. In Figure 19, you would select cell C2.
4. From the ribbon, click the Formulas tab. Then, click the Formula Builder button (see Figure 21).
14
5. In the Formula Builder window, as indicated in Figure 22, enter the following in the search box: VLOOKUP
Then, press the Return key on your keyboard.
Figure 22 – Formula Builder Search Box
6. In the Formula Builder window, double-‐click VLOOKUP (see Figure 23).
Figure 23 – Formula Builder Search Box
15
7. At the bottom of the Formula Builder window, you will see text boxes that will allow you to create a VLOOKUP on your spreadsheet (see Figure 24).
Figure 24 – Formula Builder Search Box
The following explains what values you will need to enter into these text boxes. lookup_value = Enter the location of the value that you want to lookup. In the Figure 19
example, you would enter B2. table_array = Enter the cell locations for the table to be searched. First, you would enter the
location for the upper-‐left cell (in Figure 20, this would be cell G1). Then, you would enter the location for the lower-‐right cell (in Figure 20, this would be I5).
When you enter the cell locations, place the “$” symbol before each letter and number (please see the note below for an explanation), as indicated in the following: $G$1:$I$5
col_index_num = Enter the number of columns in the table. For the example in Figure 20, you would enter 3.
NOTE: Using the $ symbol creates an Absolute cell reference (opposed to a Relative cell reference). When the Absolute cell reference is copied, it will continue to refer to the table and provide valid results. Otherwise, if you used the Relative cell reference, you would receive invalid results.
Figure 25 – Formula Builder Search Box
16
8. Press the Return key on the keyboard and the correct result from the table will appear within cell C2, as indicated in Figure 26.
Figure 26 – VLOOKUP Result in Cell C2
9. Copy the results in cell C2 throughout the remainder of the “C” column (please see below to learn how to copy a cell). Upon doing this, the results will appear as indicated in Figure 27.
Figure 27 – Cell C2 Formula Copied From C3 to C6
The following explains how to copy the formula to the other cells within the same column. A. Select the cell that contains the formula. In Figure 26, you would select C2. B. Allow your mouse pointer to hover over the bottom-‐right corner of the cell (see
Figure 28).
Figure 28 – Cell Fill Handle
C. When your cursor appears as a black plus sign, hold down the left mouse button and drag to the last cell in the column (in Figure 26, you would drag until cell C6).
D. The formula will be copied to the other cells.
Copying Cells: An Explanation
17
IF Function The IF function will test a specific cell location and return one value if TRUE and another value if FALSE. For example, suppose that students taking a test need to make a 70 or higher to pass. The following shows the logic of such a scenario using the IF function: Logical_test: Test Score >= 70 Value_if_true: PASS Value_if_false: FAIL Figure 29 contains test scores that students received on a test. The following shows how to use the IF function in Excel 2011 to determine if students pass or fail the test (The students must earn a 70 or higher to pass this test).
Figure 29 – Test Scores
1. Place your cursor in cell C2. 2. From the Formulas tab, click Formula Builder (see Figure 30).
Figure 30 – Formula Builder
3. The Formula Builder window will appear. In the search box, type IF (see Figure 31).
Figure 31 – Formula Builder
18
4. As indicated in Figure 32, double-‐click the IF that appears in the search window (see Figure 32).
Figure 32 – Formula Builder
5. Three text boxes will appear at the bottom of the Formula Builder window (see Figure 33). For the example in Figure 29, you would enter the following:
value1: B2>=70 then: Pass else: Fail
Figure 33 – Arguments for example in Figure 29
6. Press the Return key on your keyboard.
19
Additional Support
If you have questions that arise as you work with Excel 2011, the UITS department at KSU has a service desk that will provide you with technical support. The KSU Service Desk may be contacted in the following ways:
Telephone for Staff: 470 578-6999 Telephone for Students: 470 578-3555 Email Support: service@kennesaw.edu
Additional information about the KSU Service Desk can be found at the following website: http://uits.kennesaw.edu/helpdesk/index.htm
7. Copy the results in cell C2 throughout the remainder of the “C” column (please see below tolearn how to copy a cell). Upon doing this, the results will appear as indicated in Figure 34.
Figure 34 – Cell C2 Formula Copied From C3 to C8
The following explains how to copy the formula to the other cells within the same column. A. Select the cell that contains the formula. In Figure 34, you would select C2. B. Allow your mouse pointer to hover over the bottom-‐right corner of the cell (see
Figure 35).
Figure 35 – Cell Fill Handle
C. When your cursor appears as a black plus sign, hold down the left mouse button and drag to the last cell in the column (in Figure 34, you would drag until cell C8).
D. The formula will be copied to the other cells.
Copying Cells: An Explanation
Recommended