Presentation is loading. Please wait.

Presentation is loading. Please wait.

ACOT Intro/Copyright Succeeding in Business with Microsoft Excel 2010.

Similar presentations


Presentation on theme: "ACOT Intro/Copyright Succeeding in Business with Microsoft Excel 2010."— Presentation transcript:

1 ACOT Intro/Copyright Succeeding in Business with Microsoft Excel 2010

2 Course Learning Outcomes
Upon completion of this course, students will be able to: Navigate online computer platforms to acquire and distribute information. Apply Excel skills and tools in business problem solving. Solve problems with statistical analysis tools. Apply logic in decision making. Retrieve data for computation, analysis, and reference. Evaluate the financial impact of loans and investments. Organize data for effective analysis. Apply data tables and excel scenarios for what-if analysis. Synthesize smart worksheets. Enhance decision making with Solver. Succeeding in Business with Microsoft Excel 2010

3 Roadmap Chapter 5 Retrieving Data for Computation, Analysis, and Reference Succeeding in Business with Microsoft Excel 2010

4 Chapter Objectives Organize and evaluate data in vertical and horizontal look up tables Analyze and retrieve data from multiple worksheets to solve problems Use named range references in formulas to retrieve data from multidimensional tables Nest lookup and reference functions to perform complex calculations Succeeding in Business with Microsoft Excel 2010

5 Working with Lookup Tables
Contain data that can be used to create worksheets that list items, and then perform calculations Automate the process of looking up data to use in calculating unit and total prices Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Generic lookup table – possibly with products and prices Interaction: Show reference or Lookup functions in Excel Narration: You have previously learned how to create formulas with IF and nested IF functions to make decisions based on specified criteria. However, these formulas are not well suited in some circumstances, such as selecting a particular value from a long list of values. Instead of using nested IF statements, you can use a group of Excel functions known as the Reference and Lookup functions. These functions expand your ability to vary values based on criteria and find an input value that produces a specific result. In this chapter, you will use Reference and Lookup functions to retrieve data stored in the same or a different worksheet, and then use that data in formulas or reference it in another location. Data is often stored in a list format on a worksheet. A data list that categorizes values you want to retrieve is called a lookup table. You can use the data in a lookup table to create worksheets that list items, such as products ordered and their corresponding prices, and then perform calculations. The Reference and Lookup functions enable you to retrieve the appropriate data from a lookup table for use in such calculations. Succeeding in Business with Microsoft Excel 2010 Level 1 home

6 Working with Lookup Tables
Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.1 Interaction: Highlight portions of figure as described in narration Narration: Let’s say you are wanting to create an application using Excel that will be able to look up item prices, customer discounts, etc. without actually having to place an order. Currently you must look up item numbers, descriptions, discount amounts, and shipping amounts, and then calculate unit and total prices. Now you want to automate this process by creating a form (template) in Excel. Notice in figure 5.1 that there is a Unit Pricing lookup table as well as a Shipping Costs lookup table that have been included in the worksheet. There is also an area of the worksheet for an order form that lists the order information and calculates the total price. Notice the data entered from current orders, including order number, customer ID, shipping method, and quantity ordered. Next, insert the unit price based on the values stored in the Unit Pricing table (cells A7:B10), and the unit shipping charge based on the values stored in the Shipping Costs table (cells D7:E10). Now you can calculate the totals for price and shipping, and sum those to calculate the grand total. It is possible to use an IF function to insert the unit prices and unit shipping charges. You could use nested IF logic that evaluates if the quantity ordered is less than 60, charge $2.45 per unit; if the quantity ordered is greater than or equal to 60 but less than 120, charge $2.27 per unit; if the quantity ordered is greater than or equal to 120 but less than 240, charge $2.12 per unit; and if the quantity ordered is greater than or equal to 240, charge $2.00 per unit. You could construct a similar nested IF formula to calculate the unit shipping charges. However, that would require two long nested IF formulas. Furthermore, it is possible that the unit prices and shipping methods will be expanded to include more prices and methods, so using the IF function is not practical for this worksheet. Instead, you can use the VLOOKUP function to look up a unit price based on quantity, and look up a shipping charge based on method. Succeeding in Business with Microsoft Excel 2010 Level 1 home

7 Retrieving Data from a Vertical Lookup Table
VLOOKUP function Most effective and flexible way to retrieve data organized in columns Searches specified part of worksheet for data, starting with the first column =VLOOKUP(lookup_value,table_array, col_index_num,range_lookup) Must specify col_index_num Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.1 (from previous slide) Interaction: Highlight parts of chart as mentioned in narration Narration: When you organize data in a vertical lookup table, a lookup table in which the data to be searched is organized in columns, the most effective and flexible way to retrieve data is to use the VLOOKUP function. This function searches a specified part of a worksheet for data. It starts by searching for data in the first column. When it finds the required data, it retrieves the value in a specified column that is in the same row as the data found by the lookup. You use VLOOKUP when the first column of the lookup table contains the data you are looking up, also called the key data, and the corresponding information you want to find is in one of the columns to the right of the key data column, as shown in Figure 5.1. The VLOOKUP function is appropriate for finding the correct unit price in the Unit Pricing table and inserting it in cell E14, and for finding the correct unit shipping charge in the Shipping Costs table and inserting it in cell G14. As shown in Figure 5.1, the first column of the Unit Pricing table contains the quantities, which is what will be looked up. The desired information —the unit price—is included in the column to the right of the Qty column. Similarly, the first column of the Shipping Costs table contains the shipping methods, which you will look up, and the second column lists the corresponding unit charges, which is the information you want to find. When you write a VLOOKUP formula, you indicate the value you want to look up in a table. VLOOKUP searches for a matching value in the leftmost column of the table, and then retrieves the value in the same row but in another column that you specify. You can then enter a VLOOKUP formula in cell E14 to look up the unit price based on the quantity entered in cell D14. Succeeding in Business with Microsoft Excel 2010 Level 1 home

8 VLOOKUP Function Arguments
Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Table 5.3 Interaction: Show VLOOKUP syntax with narration 1: VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) Click on arguments in table to reveal descriptions Narration: The syntax of the VLOOKUP function is shown here and its arguments are described in Table 5.3. Click on each argument to reveal its description. Click on the +INFO button to see more information on how to write a VLOOKUP formula. Info for +INFO button: How to steps on pg. 295 of textbook Succeeding in Business with Microsoft Excel 2010 Level 1 home

9 Results of Using the VLOOKUP Function
Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.2 Interaction: Show formula with narration 1: =VLOOKUP(D14,A7:B10,2,TRUE) Highlight cells/information as mentioned in narration Narration: You will need to look up the quantity ordered to find the unit price, so the lookup_value is cell D14. Cells A7:B10 contain the unit pricing data; these are the cells the function will search. In the Unit Pricing lookup table, column 2 lists the unit prices, so the col_index_num argument is 2. The range_lookup argument requires the TRUE type because the function must look for the greatest value in the first column of the Unit Pricing table that is not greater than 240, the value specified in cell D14. With a FALSE type, the function would look only for the exact value 240 in the first column of the Unit Pricing table. Because customers might order amounts of cans of tennis balls that do not match exactly the amounts in the Unit Pricing table, the TRUE type is needed in this case. To insert the correct unit price in cell E14, the formula shown here is entered. This formula considers the value in cell D14 (240), and tries to match it in the first column of the range A7:B10. When it finds 240 (cell A10), it looks in column 2 for the data to retrieve, which is $2.00, and places this result in cell E14. The next step is to copy the VLOOKUP formula from cell E14 to cells E15:E19 to include the unit prices for the other orders in the order table. If you copy the formula from cell E14 to E15, the lookup_value should change from D14 to D15. The second order in row 15 should calculate unit price according to the quantity stored in D15. Therefore, the cell reference in the first argument should be relative. The table_array A7:B:10 should not become A8:B:11. The formula should reference the Unit Pricing table and, therefore, requires absolute row references. The col_index_num and range_lookup are constants and will remain the same. Therefore, you need to change the formula in cell E14 to use absolute row references in the second argument, as shown in the highlighted box. Copy the formula from cell E14 to E15:E19. Next, you can calculate the total order value by multiplying quantity by price. In cell F14, enter the formula =D14*E14, and then copy this formula to cells F15:F19, as shown in Figure 5.2. Succeeding in Business with Microsoft Excel 2010 Level 1 home

10 Check on Learning A data list that categorizes values you want to retrieve is called a _______________. Lookup table List table Query table Help table Slide reference: 5 Succeeding in Business with Microsoft Excel 2010

11 Check on Learning VLOOKUP searches for a matching value in the leftmost column of the table, and then retrieves the value _____________. In the same row, but in another column that you specify In the same column, but in another row that you specify Anywhere in the table In the same row, in the very next column Slide reference: 7 Succeeding in Business with Microsoft Excel 2010

12 Check on Learning In a VLOOKUP function, the argument ____ refers to the data you want to look up. range_lookup col_index_num table_array lookup_value Slide reference: 8 Succeeding in Business with Microsoft Excel 2010

13 Examining the VLOOKUP Algorithm
Steps that Excel performs when VLOOKUP type is TRUE and key data is sorted in ascending order: Look for an exact match Check first value in lookup table Check next value in lookup table Check last value in lookup table If using lookup type of FALSE, VLOOKUP function looks only for an exact match of the lookup value Values in lookup table need not need be sorted in ascending order VLOOKUP function displays #N/A in cell if exact match is not found Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.2 (from previous slide) Interaction: Highlight cells as described in narration 1 +INFO button for stipulation descriptions Narration: Notice in order #2, there is a quantity of 30, which is not a listed key value in the Unit Pricing table. In cell E15, shown in Figure 5.2, Excel retrieves a value of $2.45 from the Unit Pricing lookup table. How does Excel match the lookup_value of 30 to the quantities listed in cells A7:A10 to return the correct price? This can be explained by looking at the provided set of rules and function syntax of the VLOOKUP algorithm. When these rules are followed, the function is guaranteed to return the correct matching value. For a type TRUE, this is the greatest value that does not exceed the lookup value; and for a type FALSE, an exact match. These rules are defined in Excel Help. Click the +INFO button for the most important stipulations. Info for +INFO button: If a lookup_value is smaller than the smallest value in the first column of table_array, VLOOKUP returns the #N/A error value. • If a type TRUE is specified, an exact or approximate match is returned. If an exact match is not found, the next largest value that is less than lookup_value is returned. When creating a range for use with a type TRUE VLOOKUP table, make sure to sort the values in the first column of table_array in ascending order; otherwise, VLOOKUP might not return the correct value. • If a type FALSE is specified, VLOOKUP returns only an exact match if one is found. In this case, the values in the first column of table_array do not need to be sorted. If there are two or more values in the first column of table_array that match the lookup_value, the first value found (not necessarily the first value listed) is used. If an exact match is not found, the error value #N/A is returned. Succeeding in Business with Microsoft Excel 2010 Level 1 home

14 VLOOKUP Function with a FALSE Lookup Type
Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.5 Interaction: Highlight parts of chart as mentioned in narration and show change made to cell C15 (from narration 3) Narration: When you use a lookup type of FALSE, the VLOOKUP function looks only for an exact match of the lookup value. In this case, the values in the lookup table do not need to be sorted in ascending order, as they do with the TRUE type. As you have learned, if the function does not find an exact match, it displays #N/A in the cell, so you don’t have to arrange the values in a way to return correct approximate matches. Because the goal here is to find an exact match, the lookup type would be false and the highlighted formula would be entered in cell G14. To solve this formula, the function considers the value in cell C14 (Rail). Because the lookup type is FALSE, the function looks only for an exact match to Rail in the first column of the D7:E10 range, which is the Shipping Costs table. When it finds an exact match, it retrieves the corresponding value—$0.20—from the second column in the specified range. The formula would then need to be copied from cell G14 to cells G15:G19. With the FALSE lookup type, the VLOOKUP function retrieves the correct values for all of the Unit Shipping cells except cell G15. It retrieves the correct values for cell G14 and cells G16:G19 because it looks for an exact match of the lookup value, which is the Shipping value in cells C14:C19. The function retrieves the values even though the list is unsorted. The text #N/A is displayed in cell G15 because the function cannot find an exact match to the value in cell C15, which is Train. This is a data entry error that can be corrected by changing Train in cell C15 to Rail. Succeeding in Business with Microsoft Excel 2010 Level 1 home

15 Retrieving Data from a Horizontal Lookup Table
HLOOKUP function Looks up a value by testing for a criterion across a row HLOOKUP(lookup_value,table_array, row_index_num,range_lookup) Must specify row_index_num Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.9 (pg. 303 in textbook) Interaction: Highlight portions of charts as mentioned in narration Show this formula with narration 2: HLOOKUP(lookup_value,table_array,row_index_num,range_lookup) Narration: Let’s assume, using our current example, that the company is considering offering customers a discount on shipping, depending on the total price of the customer’s tennis ball order. Therefore, you will need to evaluate the effect of this potential shipping discount on the overall total order. You could begin by inserting the Shipping Discount lookup table as well as a new column labeled Shipping Discount in the Tennis Balls worksheet. Notice that the shipping discounts are presented in a horizontal format, so you cannot use the VLOOKUP function to retrieve the correct discount amount and display it in the Shipping Discount column. Instead, you can use a similar function, called HLOOKUP. (The H in HLOOKUP stands for horizontal.) When solving an HLOOKUP formula, Excel looks up a value by testing for a criterion across a row, instead of down a column. The syntax of the HLOOKUP function is shown here. Succeeding in Business with Microsoft Excel 2010 Level 1 home

16 HLOOKUP Function Arguments
Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Table 5.5 **Note this table is incomplete – be sure to get the second part of the chart from pg. 304 in textbook Interaction: Click on each argument in the table to reveal the description +INFO button for How To steps – see pg. 304 in textbook Narration: The HLOOKUP function is similar to the VLOOKUP function except that it searches a horizontal lookup table, in which data is stored in rows instead of in columns. When you use the HLOOKUP function, you specify the row_index_num instead of col_index_num. Excel then searches for the lookup_value in the first row of the table_array, or lookup table, and returns the value in the specified row. The row_index_num is counted from the first row in the lookup table, not the worksheet, so the first row in the lookup table is row 1 and the second is row 2, even if the lookup table occupies other rows in the worksheet. Click on each argument in Table 5.5 to reveal the description for each of the four arguments in the HLOOKUP function. Click on the +INFO button for more information on how to write an HLOOKUP formula. Succeeding in Business with Microsoft Excel 2010 Level 1 home

17 HLOOKUP Type TRUE Algorithm
Works in same way as for VLOOKUP function, except that values are tested across the row (instead of down the first column) First row of lookup table must be sorted in ascending order Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.10 Interaction: Highlight parts of chart as mentioned in narration Narration: First, let’s look at Shipping Discount 2. The formula entered in cell I14 must look up the total price given in cell F14 and find the corresponding discount. The lookup range (table_array argument) is the Shipping Discount lookup table in cells I7:K9. This range must start in the row with the lookup values and extend at least as far down as the row containing the data to be returned. Because we want to evaluate Shipping Discount 2, the function must retrieve data from row 3 of the lookup table (row_index_num argument). Finally, the function must use the TRUE type so that it will look for the greatest value in the first row of the lookup table that is not greater than the value in cell F14 ($480). The FALSE type, which would look for an exact match only, is not appropriate in this case. Note that the rules for an HLOOKUP function with a TRUE lookup type work in the same way as for a VLOOKUP function, except that values are tested across the first row instead of down the first column. Therefore, the first row (key values) of the lookup table must be sorted in ascending order to use an HLOOKUP function with a TRUE lookup type. Succeeding in Business with Microsoft Excel 2010 Level 1 home

18 Using HLOOKUP Function
Weekly Objective: Organize and evaluate data in vertical and horizontal look up tables Image: Figure 5.10 (same as previous slide) Interaction: Highlight parts of chart as mentioned in narration Narration: Now you are ready to use the HLOOKUP function to calculate the shipping discount value. The discount will be the shipping discount percentage multiplied by the shipping costs. Notice the formula entered in cell I14. The formula is preceded by a negative sign so that the resulting value will be negative, because the discount reduces the order cost. Also note that the table_array argument must contain absolute row references so that the row values will not change when the formula is copied down the column. The final calculation is to determine the grand total (column J). To do so, sum the following: total price (column F) plus total shipping (column H) plus shipping discount (column I). Because the shipping discount values are negative, the formula entered will actually subtract this discount amount from the total. Note formula entered in cell J14. Figure 5.10 reflects the final Tennis Balls worksheet. Consider Order #1, which totals $480. The HLOOKUP function searched the Shipping Discount 2 row in the lookup table and retrieved the corresponding discount of 10%. This discount was then multiplied by the total shipping charge (cell H14) to produce the correct shipping discount of $4.80 (cell I14). Succeeding in Business with Microsoft Excel 2010 Level 1 home

19 Check on Learning With a ____ type of VLOOKUP, the function would look only for the exact match. Simple Complex True False Slide reference: 13 Succeeding in Business with Microsoft Excel 2010

20 Check on Learning With a ____ type of VLOOKUP, the function returns the greatest value that does not exceed the lookup value. False True Complex Simple Slide reference: 13 Succeeding in Business with Microsoft Excel 2010

21 Check on Learning When solving an HLOOKUP formula, Excel looks up a value by testing for a criterion across a ____. Row Column Table Worksheet Slide reference: 17 Succeeding in Business with Microsoft Excel 2010

22 Check on Learning The first row (key values) of the lookup table must be sorted in ____ order to use an HLOOKUP function with a TRUE lookup type. Ascending Descending Alphabetical Numerical Slide reference: 17 Succeeding in Business with Microsoft Excel 2010

23 Retrieving Data from Multiple Worksheets
Use VLOOKUP and HLOOKUP formulas This is especially useful when lookup tables are long Weekly Objective: Analyze and retrieve data from multiple worksheets to solve problems Image: Figure 5.12 Interaction: Highlight parts of chart as mentioned in narration Narration: As you have learned, you can use a VLOOKUP formula and an HLOOKUP formula to retrieve data stored in lookup tables on the same worksheet. You can also use VLOOKUP and HLOOKUP to retrieve data stored in lookup tables on other worksheets. This is especially useful when lookup tables are long, such as those that contain products and prices, or when you need to retrieve data from more than one lookup table. Now that you have completed the Tennis Balls worksheet and order form, which calculates the cost of an item based on the quantity ordered, you are ready to develop a worksheet for other types of tennis equipment, such as rackets and bags, which are based on a fixed price per unit. This worksheet must accommodate orders for products that have fixed prices per unit, and include many products in a single order. Let’s begin by adding a worksheet named Costs to the Tennis Orders workbook. This worksheet is a partial list of the tennis equipment sold for a fixed price. The list includes a product description and its associated unit cost. Next, add a worksheet named Orders to the Tennis Orders workbook, which will serve as an order form, or template. This worksheet will include the data for a single customer’s order, which can contain one or more items. The idea is that salespeople will enter an item number and quantity, and formulas will retrieve or calculate the item description and item total price. Formulas will also calculate the subtotal of all items, discounts, shipping charges, and a grand total. Figure 5.12 shows how the Costs and Orders worksheets will be used together to achieve the desired results. Succeeding in Business with Microsoft Excel 2010 Level 2 home

24 Retrieving Data from Multiple Worksheets
Weekly Objective: Analyze and retrieve data from multiple worksheets to solve problems Image: Figure 5.12 Interaction: Highlight information in chart as mentioned in narration Show formula with narration 1: =Costs!C13*B3 Narration: The first product ordered is item# 12 (Touring Bag - One Size) and has a quantity of 10. To create the formula that multiplies the quantity ordered by the product’s unit price, consider writing the formula shown here in cell D3 of the Orders worksheet. This formula multiplies the value in cell C13 of the Costs worksheet by the value in cell B3 of the current worksheet. (Cell Costs!C13 contains the unit price of item# 12.) This formula would calculate the correct result, $599.90, for the first item. However, you cannot copy this formula to cells D4:D7 to calculate the total price for other items. For example, if this initial formula is copied to cell D4, it becomes =Costs!C14*B4. The reference to cell B4 is correct because that cell will contain the quantity ordered for the second item. The reference to cell C14 in the Costs worksheet, however, might or might not contain the correct unit price—it depends on the item ordered. An absolute cell reference, as in =Costs!C$13*B4, does not solve the problem either—that only references the touring bag, not any of the other 14 products. You can usually solve this type of problem by using a lookup function. Because the data is organized on the Costs sheet in a vertical format, the VLOOKUP function will work in this case. Succeeding in Business with Microsoft Excel 2010 Level 2 home

25 Using VLOOKUP with Multiple Worksheets
Weekly Objective: Analyze and retrieve data from multiple worksheets to solve problems Image: Figure 5.13 Interaction: Show this formula with narration 1: =VLOOKUP(A3,Costs!A2:C16,3,FALSE)*B3 Show this formula with narration 2: =VLOOKUP(A3,Costs!A$2:C$16,3,FALSE)*B3 Show this formula with narration 3: =VLOOKUP(A3,Pricing,3,FALSE)*B3 Show this formula with narration 4: =VLOOKUP(A3,Pricing,2,FALSE) Highlight areas of chart as mentioned in narration Narration: You can use the VLOOKUP function in cell D3 to retrieve the unit price that corresponds to the item number in cell A3, as in the formula shown here. To solve this formula, the function looks for the item number value in cell A3 (12, in this case) in the first column of the range A2:C16 in the Costs worksheet. When it finds an exact match to that value, it retrieves the data in column 3 of the lookup table, which lists the unit prices. Note that the formula uses a lookup type of FALSE because you want to find an exact match to the data entered in cell A3. What will happen is you copy this formula to the other cells in the column? Although cells A3 and B3 will vary relatively, the lookup range (A2:C16) needs to be absolute because it will not vary when the formula is copied. Therefore, the formula needs to be modified as shown here. One way to simplify the formula and be certain that the lookup range remains the same is to use a named range for the table_array Costs!A2:C16. Switch to the Costs worksheet and name the A2:C16 range Pricing. If you recall from Chapter 2, a cell or range of cells can be given a name by selecting the cells and typing a name into the Name Box. This name can then be used in formulas and copies absolutely. Then you can change the VLOOKUP formula in cell D3 of the Orders worksheet to the formula shown here. Because range names copy absolutely, you can copy this formula to cells D4:D7 and change only the references to cells A3 and B3, as appropriate. You can use a similar formula, shown here, to insert the correct item description in cells C3:C7 of the Orders worksheet. To solve this formula, the function looks for the item number value in cell A3 (12, in this case) in the first column of the Pricing range in the Costs worksheet. When it finds an exact match to that value, it retrieves the data in column 2 of the table, which lists the item descriptions. Then, enter the item number (12) and quantity (10) for the first product ordered in the Orders worksheet. Enter both VLOOKUP formulas in the appropriate cells, as shown in Figure 5.13. Succeeding in Business with Microsoft Excel 2010 Level 2 home

26 Retrieving Data from Multiple Worksheets
Weekly Objective: Analyze and retrieve data from multiple worksheets to solve problems Image: Figure 5.14 Interaction: Highlight cells as mentioned in narration Narration: Now, enter additional items for this order by entering item numbers in cells A4:A7 and the quantities ordered in cells B4:B7. Next, copy the VLOOKUP formula in cell C3 to cells C4:C7 to insert the appropriate item descriptions. Also copy the VLOOKUP formula in cell D3 to cells D4:D7 to calculate the correct order totals. You calculate the total order amount by summing the prices in cells D3:D7. (Note a blank row was included in the SUM to facilitate easy insertion of additional rows.) Figure 5.14 shows the Orders worksheet with both values and formulas displayed. Succeeding in Business with Microsoft Excel 2010 Level 2 home

27 Check on Learning You can use VLOOKUP and HLOOKUP to retrieve data stored in lookup tables on ____. the same worksheets other worksheets either A or B neither A nor B Slide reference: 23 Succeeding in Business with Microsoft Excel 2010

28 Looking Up Data in a One-Row or One-Column Range
Use LOOKUP function Looks up the greatest value that does not exceed a specified value anywhere in a table or range Can retrieve data from a lookup table with a vertical or horizontal orientation Uses only a TRUE lookup type; column or row containing lookup values must be in ascending order LOOKUP(lookup_value,lookup_vector, result vector) Weekly Objective: Analyze and retrieve data from multiple worksheets to solve problems Image: Figure 5.15 (pg. 312 in textbook) Interaction: Show this formula with narration 1: LOOKUP(lookup_value,lookup_vector,result_vector) Narration: Our next task is to calculate the value of the discount being offered to large-volume customers. The total order values in this worksheet are based on the order subtotal before shipping. Because the values he wants to look up are in column B and the values to retrieve are in column A, you cannot use the VLOOKUP function. Another possibility is to use the LOOKUP function. Unlike VLOOKUP, the LOOKUP function looks up the greatest value that does not exceed a specified value anywhere in a table or range. It can retrieve data from a lookup table with a vertical or horizontal orientation. LOOKUP also uses only a TRUE lookup type, so the column or row containing the lookup values must be in ascending order. The syntax of the LOOKUP function is shown here. Succeeding in Business with Microsoft Excel 2010 Level 2 home

29 LOOKUP Function Arguments
Weekly Objective: Analyze and retrieve data from multiple worksheets to solve problems Image: Table 5.7 Interaction: Click on argument to reveal description +INFO button for narration 2 – see steps on pg. 313 of textbook Narration: Table 5.7 describes the three arguments of the LOOKUP function. Click on each argument to reveal its description. Click the +INFO button for specific steps on how to write a lookup formula. Succeeding in Business with Microsoft Excel 2010 Level 2 home

30 Using the LOOKUP Function
Weekly Objective: Analyze and retrieve data from multiple worksheets to solve problems Image: Figure 5.15 with narration 1 (from slide 28) Figure 5.17 Interaction: Show formula with narration 2: =-LOOKUP(D9,Totals,Discounts) Highlight info in charts as mentioned in narration Narration: In order to look up the total order amount to insert the discount amount in the Orders worksheet, you must use a lookup_value of D9, which is the cell in the Orders worksheet that stores the total order amount. In the Discount worksheet (Figure 5.15), cells B2:B5 contain the total order value amounts, so this cell range will constitute the lookup_vector. Also in the Discount worksheet, cells A2:A5 contain the discount amounts, so this cell range will constitute the result_vector. To simplify the LOOKUP formula, name the range B2:B5 in the Discount worksheet Totals. Then use Totals as the second argument, the lookup_vector, in the LOOKUP formula. You can also name the range A2:A5 in the Discount worksheet Discounts so you can use Discounts as the third argument, the result_vector. In the Orders worksheet, enter the formula shown in cell D10. The negative sign at the beginning of the formula indicates that Excel should display the results as a negative value, as the discount will be deducted from the total. To solve the rest of the formula, Excel looks for the total order amount in cell D9 ($12,924.40) in the range named Totals (cells B2:B5 in the Discount worksheet). When it finds the greatest value that does not exceed $12,924.40, it retrieves the corresponding data from the range named Discounts (cells A2:A5 in the Discount worksheet), as shown in Figure 5.17. Succeeding in Business with Microsoft Excel 2010 Level 2 home

31 Check on Learning The ____ function looks up the greatest value that does not exceed a specified value anywhere in a table or range. HLOOKUP VLOOKUP LOOKUP All of the above Slide reference: 28 Succeeding in Business with Microsoft Excel 2010

32 Check on Learning The LOOKUP function has the _____ lookup type. True
False Either A or B Neither A nor B Slide reference: 28 Succeeding in Business with Microsoft Excel 2010

33 Retrieving Data from Multidimensional Tables
Use INDEX function with two- or three-dimensional tables Returns the value in a table based on row and column numbers that you specify =INDEX(reference,row_num,column_num, area_num) Has several guidelines Weekly Objective: Use named range references in formulas to retrieve data from multidimensional tables Image: Figure 5.18 pg. 315 of textbook Figure 5.19 pg. 316 of textbook Interaction: Highlight portions of images as mentioned in narration Narration: So far, you have used different lookup functions to find only one value, such as quantity, to determine a result, such as price. However, now we need to vary both the shipping region and the shipment method to calculate the shipping price in dollars per pound. To make this calculation, you can use the INDEX function, which allows you to retrieve data from multidimensional tables. Note the new worksheet (figure 5.18) named Shipping, which lists prices per pound, to the Tennis Orders workbook. If a shipping method is not available to a specific region, the worksheet displays the value NA. Prices for Air (3) and Boat (4) include local hauling to and from the freight terminal. This lookup table is a two-dimensional table. In a one-dimensional table, Excel can search a row or column to find key data, and then use that data to locate the correct value. To find a value in a two-dimensional table, Excel searches one dimension, such as the rows, and then searches another dimension, such as the columns, to find the value at the intersection of a single row and column. To calculate the shipping charge in cell D15 of the Orders worksheet, you must now account for three variables: shipping weight, region number, and shipping method. Let’s assume you want to look up the region number and shipping method in the two-dimensional table stored in the Shipping worksheet (Figure 5.18). You cannot use the VLOOKUP, HLOOKUP, or LOOKUP functions with a two-dimensional table. Instead, you must use the INDEX function, which returns the value in a table based on the row and column numbers that you specify. Succeeding in Business with Microsoft Excel 2010 Level 2 home

34 INDEX Function Arguments
Weekly Objective: Use named range references in formulas to retrieve data from multidimensional tables Image: Table 5.8 Interaction: Show formula with narration 1: INDEX(reference,row_num,column_num,area_num) Click each argument to reveal descriptions +INFO button for How To steps on index function – see pg. 317 of textbook Narration: Excel provides several forms of the INDEX function. The one that you will use has the syntax shown here and is described in Table 5.8. Click on each argument to reveal its description. Click on the +INFO button for more information on how to write an index function. Succeeding in Business with Microsoft Excel 2010 Level 2 home

35 Using an INDEX Function with a Two-Dimensional Table
Weekly Objective: Use named range references in formulas to retrieve data from multidimensional tables Image: Figure 5.20 Interaction: Show formula with narration 2: =INDEX(Shipping1,C3,C4) Highlight parts of chart as mentioned in narration Narration: To facilitate creating the necessary formula, first name the cell range B3:E7 in the Shipping worksheet Shipping1. You want to find values stored in the Shipping1 range, which contains the per pound charges for shipments according to region number and shipping method. The Shipping1 range will be the reference argument in the formula. In the Shipping1 range, rows 1 through 5 contain the region numbers. The region number for the order is stored in cell C3 of the Orders worksheet, so you can use C3 as the second argument (row_num) when you create the INDEX formula. In the Shipping1 range, columns 1 through 4 contain the Shipping Methods. The shipping method for the order is stored in cell C4 of the Orders worksheet, so you can use C4 as the third argument (column_num) in the INDEX formula. Finally, because Shipping1 is a contiguous range, you do not need to specify the area_num argument. You will insert the INDEX function in cell D15 of the Orders worksheet to calculate the shipping charge. If you enter the following formula shown here in cell D15. Will this formula produce the desired result? To solve this formula, the function refers to the data stored in the Shipping1 range. It retrieves the value at the intersection of the row specified in cell C3 (row 3) and the column specified in cell C4 (column 1). The formula only returns the shipping charge per pound. You also must multiply the results of the INDEX formula by the shipping weight, which is stored in cell C2. See the modified formula highlighted in Figure 5.20. Succeeding in Business with Microsoft Excel 2010 Level 2 home

36 Using an INDEX Function with a Three-Dimensional Table
Weekly Objective: Use named range references in formulas to retrieve data from multidimensional tables Image: Figure 5.21 – with narration 1 Figure 5.23 Interaction: Show with narration 2: INDEX((range for standard customers, range for preferred customers, range for most preferred customers), row number of the shipping region, column number of the shipping method, area number of the selected customer type) Highlight parts of chart as mentioned in narration +INFO button for guidelines – see pg. 322 of textbook Narration: Now your goal it to calculate shipping charges for three types of customers: standard, preferred, and most preferred. The Shipping worksheet is modified to reflect this additional information, as shown in Figure To retrieve the shipping charges in dollars per pound for an order, you must now work with three different variables: shipping region, shipping method, and customer type (as given by the three different shipping schedules). The INDEX function allows you to specify a list of nonadjacent ranges as the reference argument, and then specify which of these ranges to use in the area_num argument. This means the INDEX function can solve for two or more variables. You can use the INDEX function to find the shipping charge per pound, but must now include the ranges for the three schedules in the first argument. The statement shown here shows the logic that can be used in the INDEX formula. Before entering the formula, name each range in the Shipping worksheet, using the names Shipping1 (previously set up), Shipping2 (Shipping!B11:E15), and Shipping3 (Shipping!B19:E23). You will also add a new item to the Orders worksheet for entering the appropriate shipping schedule according to customer type. In the Orders worksheet, enter the highlighted formula in cell D15 to calculate the shipping charge. To solve this formula, the function refers to three named ranges: Shipping1, which contains the shipping charges for standard customers; Shipping2, which contains the shipping charges for preferred customers; and Shipping3, which contains the shipping charges for most preferred customers. The function retrieves the value at the intersection of the row specified in cell C3 (row 3 in a shipping range) and the column number specified in cell C4 (column 1 in a shipping range) in the area specified in cell C5 (2 for range Shipping2). Then it multiplies the result by the weight (lbs) in cell C2 (100). Figure 5.23 shows the resulting worksheet. Click the +INFO button for guidelines on using the Index function. Succeeding in Business with Microsoft Excel 2010 Level 2 home

37 Check on Learning The ______________ function allows you to retrieve data from multidimensional tables. INDEX LOOKUP VLOOKUP HLOOKUP Slide reference: 33 Succeeding in Business with Microsoft Excel 2010

38 Check on Learning In a(n) ________ table, Excel searches one dimension, such as the columns, and then searches another dimension, such as the rows, to find the value at the intersection of a single row and column. One-dimensional Two-dimensional Three-dimensional None of the above Slide reference: 33 Succeeding in Business with Microsoft Excel 2010

39 Check on Learning In an INDEX function, the argument ____ refers to the number of the row in the range referenced in the first argument. reference column_num area_num row_num Slide reference: 34 Succeeding in Business with Microsoft Excel 2010

40 Refining the Order Form
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.27 (pg. 327 in textbook) Figure 5.28 Interaction: Highlight parts of charts as mentioned in narration +INFO button with narration 1 – see bulleted list on pg. 325 +INFO button with narration 3 – see bulleted list on pg Narration: Our next goal is to reformat the Orders worksheet to make it easier for users to enter the necessary data. In addition, we will modify the worksheet to include products with both variable and fixed unit pricing, and to list the price per unit on the order form. Click the +Info button to see the changes that will need to be made to the Orders worksheet. After the Orders worksheet has been revised, we will switch to the Costs worksheet and rename it as Products. Next, name the range in the Products worksheet in which you will be looking up data as Products, and then add a Price Schedule column and a Ship Weight column to the Products worksheet. The Discount worksheet can be revised with a simplified horizontal format. Finally, you can add the Pricing Schedule 1, Pricing Schedule 2, and States worksheets, and modify the Shipping worksheet. Figure 5.27 shows these four worksheets. To complete the order form on the Orders worksheet, you will need to set up multiple calculations. Click the +INFO button to see a list of these calculations. Figure 5.28 shows the lookup calculations required to complete all of these tasks. You have already performed some of these calculations in the original order form, such as looking up the item description, so you only need to repeat those formulas in the modified order form. Retrieving the unit price for each item and finding the correct shipping charge, however, require more complex formulas that nest one or more functions. Now, you are ready to create the complex lookup formulas you need to complete the order form. You will nest Reference functions within the IF functions and use IS functions to develop a powerful, automated order form. Succeeding in Business with Microsoft Excel 2010 Level 3 home

41 Using the ISBLANK Function
ISBLANK functions Nine functions that test a value or cell reference, then return a TRUE or FALSE value depending on results Often used in formulas to test the outcome of a calculation When combined with IF function, help locate data-entry errors =ISBLANK(value) Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Show formula with narration 1: =VLOOKUP(A9,Products,2,FALSE) Figure 5.29 –pg. 330 of textbook Show syntax as mentioned in narration 3: ISBLANK(value) Interaction: Highlight information as mentioned in narration Narration: You can start developing the new order form by entering a VLOOKUP formula in cell B9 of the Orders worksheet to retrieve the product description for the first item. Enter the formula shown here. To solve this formula, the VLOOKUP function scans the lookup range named Products for an exact match to the value specified in cell A9, which is 5. When it finds that value, it retrieves the corresponding data in column 2 of the lookup range, which contains the description for item# 5. Copy this VLOOKUP formula from cell B9 to cells B10:B14. Figure 5.29 shows the resulting worksheet. Cells B13 and B14 display the error #N/A because you have provided item numbers for four products, but the form has room for six. The formula in cell B13 refers to the empty cell A13, and the formula in cell B14 refers to the empty cell A14. You could respond to the #N/A error by deleting the VLOOKUP formulas in cells B13 and B14, but if you receive an order of more than four items, you would have to enter the formulas again. Instead, you can use the ISBLANK function to prevent the #N/A error. Excel provides nine functions, called the IS functions, that test a value or cell reference, and then return a TRUE or FALSE value depending on the results. For example, you can use the ISBLANK function to test a cell reference. If the cell is blank, or empty, the function returns the value TRUE. You can specify what Excel should do in this case, such as display a dash (-) or N/A in the cell. The syntax of this function is shown here. The IS functions are often used in formulas to test the outcome of a calculation. If you combine them with the IF function, they help you locate data-entry errors. For example, you could write a formula using the ISTEXT function to check whether cell A5 contains text, such as a customer name. If a user committed a data-entry error by entering a number in cell A5 instead of text, you could display a message such as “Cell A5 must contain text.” Succeeding in Business with Microsoft Excel 2010 Level 3 home

42 IS Functions Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Table 5.12 Interaction: Click function to reveal description +INFO button for How to steps on ISBLANK formula – see pg. 332 of textbook Narration: Table 5.12 lists and describes the nine IS functions, which all check for a condition and then return a TRUE or FALSE value. Click the function to reveal its description. Click the +INFO button to see more information on how to write an ISBLANK formula. Succeeding in Business with Microsoft Excel 2010 Level 3 home

43 Nesting Lookup Functions to Calculate the Price Per Unit
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure pg. 333 in textbook Figure 5.32 Interaction: +INFO button to show 4 arguments on pg. 334 in textbook (with narration 3) Narration: In the first version of the order form created, the price per unit was based on the quantity ordered. Because you were only considering tennis balls, you could use a basic VLOOKUP type TRUE formula to find the appropriate unit price. In the next version, the price per unit was based on the item ordered, and you used a VLOOKUP type FALSE formula to retrieve the fixed price of a tennis product based on its item number. Now, we are ready to combine these two capabilities. First, substitute the unit price in the Products worksheet for a Price Schedule column, which contains price schedule codes. Price schedule code 1 refers to fixed-price products, and price schedule code 2 refers to tennis balls, which are based on prices that vary by quantity. For each price schedule code there is a separate corresponding pricing schedule worksheet, which contains the unit costs for the items. This process is diagramed in Figure 5.31. Because each price schedule lookup table on the pricing schedule worksheets is in a vertical format, one way to look up the correct unit price is to create a VLOOKUP function and vary the arguments of the function depending on the price schedule code of the item. The difficult part of the formula is that some arguments of the VLOOKUP will require Excel to, in turn, look up the price schedule code before it can be determined what value is needed for that argument. Figure 5.32 diagrams the logic of the formula that you will need to create. According to Figure 5.32, you will need to specify the four arguments for the VLOOKUP function. Click the +INFO button to see this information. Succeeding in Business with Microsoft Excel 2010 Level 3 home

44 Check on Learning Excel provides nine functions, called the ____ functions, that test a value or cell reference, and then return a TRUE or FALSE value depending on the results. IS IF OR OF Slide reference: 41 Succeeding in Business with Microsoft Excel 2010

45 Check on Learning The ISBLANK function checks whether a specified value refers to an empty cell. The syntax of this function is as follows: ____. ISBLANK(value,reference) ISBLANK(reference) ISBLANK(value) ISBLANK(reference,value) Slide reference: 41 Succeeding in Business with Microsoft Excel 2010

46 Nesting VLOOKUP in an IF Function to Determine the lookup_value
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.33 Interaction: Highlight first formula with narration 1 (VLOOKUP) Narration: The first argument you will write in your VLOOKUP formula to determine unit price is the lookup_value. The lookup_value is either the item number entered in cell A9 for fixed-priced items or the quantity entered in cell C9 for variable priced items. You want Excel to first test whether this item has a fixed price per unit using an IF function. The logical test of the IF function requires Excel to retrieve the price schedule code for this item on the Products table using a VLOOKUP. If the price schedule code value equals 1, then the item number (A9) will be the lookup_value of the original VLOOKUP; otherwise, the quantity (C9) will be the lookup_value. To determine the unit price for an ordered item, you will enter the expression shown here as the first argument of the longer VLOOKUP formula in cell E9 of the Orders worksheet. To solve this expression for the first item (item# 5), Excel looks up the price schedule code in the Products range (Products!A5:D20) for item# 5 retrieving only an exact match (type FALSE). The price schedule code for item# 5 is 1; thus the IF function will select the value in cell A9 (5) as the lookup_value. Figure 5.33 shows the details of the the formula to determine the unit price. Succeeding in Business with Microsoft Excel 2010

47 Using the CHOOSE Function to Determine the table _array
A Reference and Lookup function that can return a value or a range for up to 254 different values =CHOOSE(index_num,value1,value2,…) Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.27 –pg. 327 in textbook Interaction: Show/highlight portion of this chart as mentioned in narration Show this syntax with narration 2 : CHOOSE(index_num,value1,value2,...) +INFO button: show bullets provided along with How to steps on pg. 336 Narration: Next, you must specify the second argument of the VLOOKUP, the table_array that contains the appropriate lookup table, which is determined by the price schedule code. You can use Price1 as the name of the range A4:B17 in the Pricing Schedule 1 worksheet, the range containing the item numbers and unit prices for fixed-price products. Use Price2 as the name of the range A4:B7 in the Pricing Schedule 2 worksheet, the range containing the quantity and unit prices for tennis balls. If the price schedule code is 1, Excel uses the Price1 range. If the price schedule code is 2, Excel uses the Price2 range. In short, you want to look up the value 1 or 2 and return the range Price1 or Price2. But how can you look up a value and return a range? None of the Reference and Lookup functions he has used so far can solve the problem of returning a range and not a single value. One way to accomplish this might be to use another VLOOKUP function nested within an IF function. However, the company might add more pricing schedules, which would require an unnecessarily complex formula with many levels of nesting. Instead, consider using the CHOOSE function, another Reference and Lookup function that can return a value or a range for up to 254 different values. The syntax of the CHOOSE function is shown here. The index_num argument specifies which value to select from the list that follows. Index_num must be a number between 1 and 254, a formula, or a reference to a cell containing a number between 1 and 254. The list of values (value1, value2, and so on) can be numbers, text, cell references, or even ranges. For example, in the formula =CHOOSE(2,A2:A7,B2:B7,C2:C7), the first argument (2) means that Excel should choose the second value—in this case, the range B2:B7—from the list of four values. Click the +INFO button for conditions to keep in mind when specifying the index_num argument, along with steps for writing a CHOOSE formula. Info for +INFO button: If the index_num is 1, the function returns the first value from the list. If the index_num is 2, the function returns the second value from the list, and so on. • If the index_num is less than 1 or greater than the last value in the list, the function displays the error #VALUE! • If the index_num is a fraction, it is truncated to an integer before being used. Succeeding in Business with Microsoft Excel 2010 Level 3 home

48 Using the CHOOSE Function to Determine the table_array
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.29 pg. 330 Figure 5.34 Interaction: Highlight cells or parts of Figure 5.29 as mentioned in narration – take out the text boxes around the chart that refer to previous info – change to fit narration used on this page Show formula with narration 2: CHOOSE(VLOOKUP(A9,Products,3,FALSE),Price1,Price2)... Narration: You can use the CHOOSE function to determine the table_array. You can write this part of the VLOOKUP formula so that the CHOOSE function returns the Price1 range or the Price2 range, depending on the price schedule code used for the specified item number. To create the CHOOSE function, first consider what to use for the index_num argument. You want to choose the appropriate price schedule code: 1 or 2. The price schedule code, however, is listed on the Products table by item number. For example, item# 5 uses price schedule code 1. To retrieve the appropriate price schedule code to use as the index_num argument of the CHOOSE function, you can write the same VLOOKUP function used in the first argument to retrieve the price schedule code. The resulting value determines which range to choose: Price1 or Price2. The value1 and value2 arguments are the ranges associated with price schedule code 1 (Price1) and price schedule code 2 (Price2). To select the appropriate price schedule code (table_array argument) for the first item on the order form, you can use the expression shown here in the VLOOKUP formula in cell E9 of the Orders worksheet. To solve this expression, Excel chooses the price schedule as determined by the VLOOKUP function. In the Products range, it looks for the item number referenced in cell A9 (5), and retrieves an exact match to the value in column 3, which is 1. Then the CHOOSE function uses that value as the index_num, selecting the first value in the list, which is the Price1 range. Figure 5.34 shows the second argument (table_array) of the formula in cell E9 for calculating the unit price. Excel begins to solve the VLOOKUP function by determining whether it should match the item number or the quantity in a lookup table. It chooses which lookup table to use by looking in the Products range for the item number referenced in cell A9 (5), and then retrieving an exact match to the value in column 3, which is the price schedule code 1. Then it chooses the Price1 range (value 1) as the lookup table. Succeeding in Business with Microsoft Excel 2010 Level 3 home

49 Determining the col_index_num
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.35 Figure 5.36 Interaction: Show with narration 3: VLOOKUP(A9,Products,3,FALSE)>1... Narration: The next step is to select the col_index_num of the VLOOKUP function. Vijay designed all of the pricing schedules to list the lookup values in column 1 and the prices in column 2. You can, therefore, use the value 2 as the col_index_num because both lookup tables list prices in column 2. Combining the col_index_num argument with the other two parts of the formula, the partial formula in cell E9 now looks like the one shown in Figure 5.35. The fourth and final argument of the VLOOKUP function is the range_lookup type, which can be TRUE or FALSE. Like the lookup_value, this argument varies depending on the associated pricing schedule. If Excel uses pricing schedule 1, the Price1 range, it looks up the item number exactly, meaning you should use a FALSE lookup type. If Excel uses any other variable pricing schedule, such as 2 for the tennis balls, it looks up the quantity, which might not exactly match the values in the lookup table, and therefore requires a TRUE lookup type. To determine the correct range_lookup, you again need to determine which price schedule code is associated with the specified item number. Similar to how you found the price schedule code in the first and second arguments, you can use another VLOOKUP function. If the price schedule code is equal to 1, this argument should be FALSE; otherwise, it should be TRUE. To select the appropriate lookup type, you can use the relational expression shown here that compares the results of the VLOOKUP function to see if it is greater than 1. Add this argument to the formula you have already begun to enter in cell E9 of the Orders worksheet. To solve this expression, Excel looks for an exact match to the value stored in cell A9 (5), and then retrieves the corresponding value from the third column of the Products table, which lists the price schedule code associated with this item. If that price schedule code is greater than 1, Excel returns a TRUE value; otherwise, it returns a FALSE value. Because the price schedule code for item# 5 is 1, the formula will return FALSE. After combining the range_lookup argument with the other parts of the formula, the complete VLOOKUP function to be entered in cell E9 now looks like the one shown in Figure 5.36. Succeeding in Business with Microsoft Excel 2010 Level 3 home

50 Determining the range_lookup
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.37 Figure 5.38 Interaction: Highlight parts of images as mentioned in narration Narration: You have now determined each of the four arguments of the VLOOKUP formula that will find the unit price. In order to avoid displaying the error #N/A, you will use the IF and ISBLANK functions as you did before to display a blank cell in cell E9 if no item number is entered in cell A9. The formula shown here should be entered in cell E9. (Note that each part of the formula is shown on a separate line for readability here, but you will enter the entire formula on one line in Excel.) Copy this formula from cell E9 to cells E10:E14 to provide the unit prices for the other items in the order. Succeeding in Business with Microsoft Excel 2010 Level 3 home

51 Calculating Totals Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.39 Interaction: Show formula with narration 1 : =IF(ISBLANK(A9)," ",C9*E9) Show formula with narration 2: =SUM(F9:F14) Show formula with narration 3: =SUM(D9:D14) Highlight cells in chart as mentioned in narration Narration: Now that we have solved the complex problem of unit pricing, you can focus on an easier task: calculating the total cost of each item and the total cost of the order. In cell F9, you can calculate the total price by multiplying the unit price by the quantity. Again taking into account blank rows, enter the formula shown here in cell F9. Copy it to cells F10:F14, and then you can calculate the total order amount in cell F16 by using this formula. Finally, in cell D16, enter the formula shown here to calculate the total weight of the order. Figure 5.39 shows the Orders worksheet with totals calculated. Succeeding in Business with Microsoft Excel 2010 Level 3 home

52 Calculating the Discount Amount
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.40 – with narration 1 Figure 5.41 pg. 342 in textbook – with narration 2 Interaction: Show formula with narration 1: = HLOOKUP(F16,Discounts,2,TRUE) Highlight parts of image as mentioned in narration Narration: You can simplify the Discount worksheet so that it contains a basic horizontal lookup table. Name the range of values Discounts, as shown in Figure According to this table, all orders of $5,000 or more qualify for a discount based on a sliding scale. You can use a basic HLOOKUP formula, shown here, in cell F17 in the Orders worksheet to calculate the discount. Excel solves this formula by looking up the value stored in cell F16 (the order total, $16,798.85) in the Discounts table, and retrieving the value in the second row. The formula uses the TRUE lookup type because it does not need to exactly match the specified value, and includes a negative sign at the beginning so that Excel returns a negative value. Figure 5.41 shows the Orders worksheet with this formula entered. Succeeding in Business with Microsoft Excel 2010 Level 3 home

53 Check on Learning The CHOOSE function can return a value or a range for up to ____ different values. 12 157 202 254 Slide reference: 47 Succeeding in Business with Microsoft Excel 2010

54 Check on Learning The syntax of the CHOOSE function is as follows: ____. =CHOOSE(index_num,value1,value2,…) =CHOOSE(num_index,vaule1,value2,…) =CHOOSE(value1,value2,…) =CHOOSE(range_num,value1,value2,…) Slide reference: 47 Succeeding in Business with Microsoft Excel 2010

55 Calculating the Shipping Costs Using MATCH and INDEX Functions
=INDEX(reference,row_num,column_num, area_num) MATCH function Designed to return relative position of an item in a list MATCH(lookup_value,lookup_array, match_type) Has several guidelines Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.42 pg. 343 of textbook Interaction: +INFO button with narration 1- see bullets at bottom of pg. 342 Show formula with narration 2: INDEX(reference,row_num,column_num,area_num) +INFO button with narration 3: see info at bottom of narration Show with narration 4: MATCH(lookup_value,lookup_array,match_type) Narration: Even though you are using the same format for the shipping schedules as you did originally, let’s assume you need to change the formula for calculating shipping costs to let users enter the destination state, shipping method, and customer type as text. These text entries will replace the numeric codes used for region, shipping method, and customer type. In addition, you will retrieve the shipping cost in $/lb and then multiply it by the total shipping weight that was previously determined. Click the +INFO button to see the shipping charges which are now based on these input variables, which are also shown in Figure 5.42. One possible way to perform these tasks is to use the INDEX function, as you did in an earlier version of the order form. However, for this formula, each argument in the INDEX function might require an additional nested lookup function. Recall that the syntax of the INDEX function is shown here. First, prepare the Order worksheet for the INDEX function by entering the values for state, shipping method, and freight customer type in cells Orders!F4:F6. Enters CO for state, Truck for shipping method, and Preferred for customer type. Now, the required index function would need a row number, column number, and area number, which do not correspond directly to the inputs of CO, Truck, and Preferred. Each required argument must be retrieved from another table. Click the +INFO button for descriptions of these arguments. The third argument of the INDEX function requires the table column value. In the shipping tables, the columns represent the different shipping methods. To determine the column number to use, you must match the shipping method description entered in cell F5 of the Orders worksheet to the column number in the appropriate shipping table. One way to do this is to set up a separate lookup table, however a simpler technique is to use a MATCH function. The MATCH function is designed to return the relative position (such as 1, 2, or 3) of an item in a list. Although the LOOKUP function returns a corresponding value in a list, the MATCH function returns the relative position number of the lookup_value in a list. The syntax of the MATCH function is shown here. INFO for +INFO button: First argument: reference—This argument is the listing of possible ranges for the lookup. On the Shipping worksheet, the three noncontiguous ranges are named Shipping1 (B5:E9), Shipping2 (B13:E17), and Shipping3 (B21:E25). • Second argument: row_num—To retrieve the shipping charge per pound, you will need the row number corresponding to the ship to region. The row_num is determined by the region number, which must be determined by the ship to state entered in cell F4 of the Orders worksheet. To obtain the region from the state abbreviation entered, the user will need to look up the appropriate region number listed in the range B2:D52 on the States worksheet. This range is named States to make it easier to reference in the Orders worksheet. • Third argument: column_num—Also needed to retrieve the shipping charge per pound is the column number. The column number is determined by the shipping method. You need to find the shipping method column (1, 2, 3, or 4) that corresponds to the shipping method description, which is entered in cell F5 of the Orders worksheet. To obtain this from the user input, a number will need to be assigned to each corresponding description (Truck, Rail, Air, Boat). Fourth argument: area_num—The last argument, the area_num, determines which noncontiguous range (Shipping1, Shipping2, Shipping3) is used for this lookup. Because this must be a number, you must look up the corresponding number for the selected freight customer type. Succeeding in Business with Microsoft Excel 2010 Level 3 home

56 MATCH Function Arguments
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Table 5.13 Interaction: Click on argument in table to reveal description +INFO button for narration 2- see guidelines on pg in textbook Narration: Table 5.13 describes the syntax of the MATCH function. Click on each argument to reveal its description. Click on the +INFO button to see the guildelines for using the MATCH function. Succeeding in Business with Microsoft Excel 2010 Level 3 home

57 Using the INDEX Function
Determine reference argument of INDEX function Determine row_num of INDEX function Determine col_num of INDEX function by using MATCH function Determine area_num of INDEX function Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.42 on pg. 343 (was used in slide 55) Show with narration 1: MATCH(F5,Shipping!B4:E4,0) Show with narration 2: =INDEX((Shipping1,Shipping2,Shipping3),VLOOKUP(F4,States,3,FALSE),MATCH(F5,Shipping!B4:E4,0),area_num)*total weight Show with narration 3: MATCH(F6,{"regular","preferred","most preferred"},0) Show with narration 4: =INDEX((Shipping1,Shipping2,Shipping3),VLOOKUP(F4,States,3,FALSE),MATCH(F5,Shipping!B4:E4,0),MATCH(F6,{"regular","preferred","mostpreferred"},0))*total weight Interaction: Highlight cells or show only parts of Figure 5.42 that are relevant to narration Narration: In this case, we want to match the value entered in cell F5 in the Orders worksheet, the shipping method text, so this value will be the lookup_value. In the Shipping worksheet, cells B4:E4 list the shipping method text as column headings; this range constitutes the lookup_array. In order to find an exact match to the shipping method text entered in cell F5, you will use a match_type of 0. So, you can use the expression shown here as the column_num argument in the INDEX function. For the MATCH function to work correctly, the shipping methods must be listed using the same text and in the same order in all three of the shipping tables. Nesting this argument within the formula before proceeding, you would have the formula shown here. To complete the INDEX function, you will need to specify the area_num value, which represents the range that contains the value he wants to retrieve—area 1, 2, or 3. The reference ranges have already been listed as Shipping1, Shipping2, and Shipping3. To determine which range to use, compare the range name to the freight customer type, where Shipping1 is for regular customers, Shipping2 is for preferred customers, and Shipping3 is for most preferred customers. In cell F6 of the Orders worksheet, users will enter regular, preferred, or most preferred as text. Because there is a one-to-one correspondence between freight customer type descriptions and freight customer type ranges, you can use a MATCH function to determine the area_num, just as he used a MATCH function to determine the column_num. This time you will need to list these descriptions in the appropriate order within the function, as shown here. To solve this expression, Excel exactly matches the value entered in cell F6 to a description in the list nested within the lookup_array argument, and then returns the position of that description in the list. When using the MATCH function with a nested list, the lookup_array must be enclosed in curly braces. Placing this argument within the formula before proceeding, you would have the formula shown here. Succeeding in Business with Microsoft Excel 2010 Level 3 home

58 Creating the Complex INDEX Formula and Completing the Worksheet
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.45 Interaction: Show formula with narration 1: =INDEX((Shipping1,Shipping2,Shipping3),VLOOKUP(F4,States,3,FALSE),MATCH(F5,Shipping!B4:E4,0),MATCH(F6,{"regular","preferred","mostpreferred"},0))*D16 Narration: You have defined each argument in the INDEX function to retrieve the appropriate shipping rate. Now, you can multiply that value by the total number of pounds to create the complete formula as shown here. The formula is described in detail in Figure 5.45. Succeeding in Business with Microsoft Excel 2010 Level 3 home

59 Creating the Complex INDEX Formula and Completing the Worksheet
Weekly Objective: Nest lookup and reference functions to perform complex calculations Image: Figure 5.46 Interaction: Show with narration 1: :=SUM(F16:F18) Highlight parts of chart as mentioned in narration Narration: Finally, you can calculate the grand total of the order by summing the discount, order amount, and shipping charge. Enter the formula shown here in cell F20. Succeeding in Business with Microsoft Excel 2010 Level 3 home

60 Check on Learning The __________ function is designed to return relative position of an item in a list. CHOOSE MATCH INDEX LOOKUP Slide reference: 55 Succeeding in Business with Microsoft Excel 2010

61 Check on Learning The syntax of the MATCH function is__________.
MATCH(lookup_value,lookup_array,match_type) MATCH(lookup_value, match_type) MATCH(value_lookup,match_type,lookup_array) MATCH(lookup_value,lookup_array) Slide reference: 55 Succeeding in Business with Microsoft Excel 2010

62 Chapter Summary Performing basic lookups to calculate and evaluate data Performing more complex lookups involving multiple worksheets and multidimensional tables Nesting lookup and reference functions to retrieve and calculate data Succeeding in Business with Microsoft Excel 2010

63 Objectives In this chapter, you covered the following objectives:
Organize and evaluate data in vertical and horizontal look up tables Analyze and retrieve data from multiple worksheets to solve problems Use named range references in formulas to retrieve data from multidimensional tables Nest lookup and reference functions to perform complex calculations Succeeding in Business with Microsoft Excel 2010


Download ppt "ACOT Intro/Copyright Succeeding in Business with Microsoft Excel 2010."

Similar presentations


Ads by Google