{"id":110,"date":"2024-05-01T12:43:38","date_gmt":"2024-05-01T12:43:38","guid":{"rendered":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/chapter\/chapter-7-vlookup-function\/"},"modified":"2024-09-18T00:52:43","modified_gmt":"2024-09-18T00:52:43","slug":"chapter-7-vlookup-function","status":"publish","type":"chapter","link":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/chapter\/chapter-7-vlookup-function\/","title":{"raw":"Chapter 7: VLOOKUP Function","rendered":"Chapter 7: VLOOKUP Function"},"content":{"raw":"<div class=\"chapter-7:-vlookup-function\">\r\n<div class=\"textbox textbox--learning-objectives\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\" style=\"text-align: justify\">Learning Objectives<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\" style=\"text-align: justify\">\r\n<ol>\r\n \t<li>Use the VLOOKUP function.<\/li>\r\n \t<li>Format numbers to Accounting format.<\/li>\r\n \t<li>Wrap text the cell content.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">The [pb_glossary id=\"192\"]VLOOKUP [\/pb_glossary]function accepts a value, then looks the value up in a vertical lookup table and returns a result. You can use the VLOOKUP function to search for exact matches or approximate matches.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">In this chapter, you will learn two examples of the VLOOKUP function, one is to search for exact matches and the other is to search for the approximate matches.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">The Figure below shows the first example of the VLOOKUP function which is to search for exact matches. This example allows you to type a fruit name in cell E1 and Excel will return the corresponding price in cell F1.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/05\/image1-3.png\" alt=\"image\" width=\"1378\" height=\"777\"> Figure 7.1 Type the contents and the formula using the IF function.[\/caption]\r\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Type the contents in their respective cells. Use the default font and font size. You may bold and centre the content in each cell as shown in the Figure. Adjust any column width if necessary. <\/span><\/p>\r\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">In cell F1, type the formula using the VLOOKUP function, =VLOOKUP(E1,A2:B9,2,FALSE). Press Enter and you get the result.<\/span><\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Using the VLOOKUP function, Excel looks for any matched value in the range of cells from cell A2 until cell A9 vertically based on the value in cell E1.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">If the value in cell E1 is matched with any value in the range of cells from cell A2 until cell A9, Excel returns the corresponding value from column B. In this formula, column A is column number 1, and column B is column number 2. That is why, the range of cells should be from A2 until B9 or written as A2:B9 in the formula.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Column B or column number 2 is where the corresponding value is extracted. That is why, the column number in the formula is written as 2. The word FALSE in the formula instructs Excel only to search for an exact match from Column A or column number 1.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">In this example, the value in cell E1 is Banana, where it matches the value in cell A3 in the range of cells. The corresponding value from column number 2 is 7. Thus, Excel returns 7 in cell F1.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">If you replace the value in cell E1 with the other value, Excel will return the corresponding value from column number 2. For example, if you replace it with Orange, Excel will return 3 in cell F1. However, if you replace it with a value not in the range of cells such as Mango or just leave it blank, Excel will return #N\/A in cell F1. This is how you use the VLOOKUP function to find an exact match from the range of cells.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Let\u2019s save the workbook to Chapter7.xlsx or any file name you prefer.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Go back to the worksheet and let\u2019s format the numbers to the Accounting format with the dollar sign ($) symbol. The Accounting format is the most popular format for numbers, especially for creating financial statements and budgets.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">See the Figures below to learn how to format the numbers to the Accounting format with the dollar sign ($) symbol.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image2-6.png\" alt=\"image\" width=\"1378\" height=\"778\"> Figure 7.2 Click and hold your mouse button on cell B2.[\/caption]\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image3-6.png\" alt=\"image\" width=\"1378\" height=\"777\"> Figure 7.3 While holding the mouse button, drag the mouse pointer until cell B9.[\/caption]\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image4-5.png\" alt=\"image\" width=\"1378\" height=\"778\"> Figure 7.4 Click an Accounting Number Format drop-down arrow.[\/caption]\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image5-5.png\" alt=\"image\" width=\"1378\" height=\"778\"> Figure 7.5 Select $ English (United States) from the menu.[\/caption]\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img style=\"text-align: initial;font-size: 1em\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image6-4.png\" alt=\"image\" width=\"1378\" height=\"778\"> Figure 7.6 The selected numbers are formatted to Accounting format.[\/caption]\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Now, you\u2019re done with formatting the numbers to Accounting format with a dollar symbol, $ English (United States).<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">You can format cell F1 to Accounting format with the same steps as described in the above Figures.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image7-4.png\" alt=\"image\" width=\"1378\" height=\"778\"> Figure 7.7 Format cell F1 to Accounting format.[\/caption]\r\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">You can change to another symbol depending on which currency you prefer.<\/span><\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">The second example of the VLOOKUP function is to search for approximate matches.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Before you proceed with the example, rename the current worksheet to Fruits. See the Figure below.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image8-4.png\" alt=\"image\" width=\"1378\" height=\"778\"> Figure 7.8 Rename the current worksheet to Fruits.[\/caption]\r\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Then, insert the new worksheet and rename it to Sales and Commissions. See the Figure below.<\/span><\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1378\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image9-3.png\" alt=\"image\" width=\"1378\" height=\"776\"> Figure 7.9 Create a new worksheet and rename it to Sales and Commissions.[\/caption]\r\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">The second example of the VLOOKUP function which is to search for approximate matches allows you to determine the commission rate in percentage (%) based on the sales made by each salesperson. See the Figure below.\u00a0<\/span><\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1379\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image10-3.png\" alt=\"image\" width=\"1379\" height=\"777\"> Figure 7.10 Type the contents and the formula using the VLOOKUP function.[\/caption]\r\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Type the contents in their respective cells. Use the default font and font size. You may bold and centre the content in each cell as shown in the Figure. Adjust any column width if necessary. You can format the numbers in Accounting format as described previously. In cell G2, type the formula using the VLOOKUP function, =VLOOKUP(F2,$A$2:$B$7,2,TRUE). Press Enter and you get the result.<\/span><\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Using the VLOOKUP function, Excel looks for any matched value in the range of cells from cell A2 until cell A7 vertically based on the value in cell F2. If the value in cell A2 is approximately matched with any value in the range of cells from cell A2 until cell A7, the Sales column, Excel returns the corresponding value from column B, the Commissions column. In the formula, column A is column number 1, and column B is column number 2. That is why, the range of cells should be from A2 until B7 or written as $A$2:$B$7 in the formula.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Note that this time, you should insert a dollar symbol, ($) in the cells to make them absolute references, as you are going to copy and paste the formula using the Fill handle later for the other cells in the same column.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Column B or column number 2 is where the corresponding value is extracted. That is why, the column number in the formula is written as 2. The word TRUE in the formula instructs Excel to search for approximate matches from Column A, the Sales column, or column number 1.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">In this example, the value in cell F2 is $57,935.00, where it approximately matches or is greater than the value in cell A7, or the $55,000.00 breakpoint. Since the value or the lookup value in cell A7 is greater than the $55,000 breakpoint, and there is no breakpoint afterward, then Excel stays on that row. It then uses the column index number as written in the formula as number 2 to identify the column containing the value to return for the lookup value. The corresponding value from column number 2 is 8. Thus, Excel returns 8 in cell G2.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Do note that because Excel goes sequentially through the breakpoints. These breakpoints must be arranged from the lowest value to the highest value for ranges. If no exact match is found, Excel returns #N\/A.<\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">The Figure below shows when all Commissions have been calculated using the VLOOKUP function.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1436\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image11-2.png\" alt=\"image\" width=\"1436\" height=\"810\"> Figure 7.11 All Commissions have been calculated using the VLOOKUP function.[\/caption]\r\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Do observe in the above Figure, that Excel returns #N\/A in cell G8. This is because the value in cell G8 is no greater than the $5,000 breakpoint, thus no match and it is considered as no commission, or #N\/A.<\/span><\/p>\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Now, let\u2019s edit cells B1 and G1 to insert (%) at the end of the word Commission to make them more understandable for the worksheet presentation, and later wrap text both contents. See the Figures below.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1379\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image12-2.png\" alt=\"image\" width=\"1379\" height=\"777\"> Figure 7.12 Edit cell B1 and insert (%) at the end of the Commission.[\/caption]\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1379\"]<img style=\"text-align: initial;font-size: 1em\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image13-2.png\" alt=\"image\" width=\"1379\" height=\"777\"> Figure 7.13 Click the Wrap text button.[\/caption]\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1379\"]<img style=\"text-align: initial;font-size: 1em\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image14-1.png\" alt=\"image\" width=\"1379\" height=\"777\"> Figure 7.14 The content in cell B1 is wrapped in multiple lines.[\/caption]\r\n<p class=\"import-MyText\" style=\"text-align: justify\">Follow the above Figures to edit cell G1 and to insert (%) at the end of the word Commission. Later, wrap the content in cell G1.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"1379\"]<img src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image15-1.png\" alt=\"image\" width=\"1379\" height=\"777\"> Figure 7.15 The content in cell G1 is wrapped in multiple lines.[\/caption]\r\n<p class=\"import-MyText\" style=\"text-align: justify\">That\u2019s all for this Chapter.<\/p>\r\n<p class=\"import-NormalWeb\" style=\"text-align: justify\">You're awesome!<\/p>\r\n\r\n<\/div>","rendered":"<div class=\"chapter-7:-vlookup-function\">\n<div class=\"textbox textbox--learning-objectives\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\" style=\"text-align: justify\">Learning Objectives<\/p>\n<\/header>\n<div class=\"textbox__content\" style=\"text-align: justify\">\n<ol>\n<li>Use the VLOOKUP function.<\/li>\n<li>Format numbers to Accounting format.<\/li>\n<li>Wrap text the cell content.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p class=\"import-MyText\" style=\"text-align: justify\">The <a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_110_192\">VLOOKUP <\/a>function accepts a value, then looks the value up in a vertical lookup table and returns a result. You can use the VLOOKUP function to search for exact matches or approximate matches.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">In this chapter, you will learn two examples of the VLOOKUP function, one is to search for exact matches and the other is to search for the approximate matches.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">The Figure below shows the first example of the VLOOKUP function which is to search for exact matches. This example allows you to type a fruit name in cell E1 and Excel will return the corresponding price in cell F1.<\/p>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/05\/image1-3.png\" alt=\"image\" width=\"1378\" height=\"777\" \/><figcaption class=\"wp-caption-text\">Figure 7.1 Type the contents and the formula using the IF function.<\/figcaption><\/figure>\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Type the contents in their respective cells. Use the default font and font size. You may bold and centre the content in each cell as shown in the Figure. Adjust any column width if necessary. <\/span><\/p>\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">In cell F1, type the formula using the VLOOKUP function, =VLOOKUP(E1,A2:B9,2,FALSE). Press Enter and you get the result.<\/span><\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Using the VLOOKUP function, Excel looks for any matched value in the range of cells from cell A2 until cell A9 vertically based on the value in cell E1.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">If the value in cell E1 is matched with any value in the range of cells from cell A2 until cell A9, Excel returns the corresponding value from column B. In this formula, column A is column number 1, and column B is column number 2. That is why, the range of cells should be from A2 until B9 or written as A2:B9 in the formula.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Column B or column number 2 is where the corresponding value is extracted. That is why, the column number in the formula is written as 2. The word FALSE in the formula instructs Excel only to search for an exact match from Column A or column number 1.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">In this example, the value in cell E1 is Banana, where it matches the value in cell A3 in the range of cells. The corresponding value from column number 2 is 7. Thus, Excel returns 7 in cell F1.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">If you replace the value in cell E1 with the other value, Excel will return the corresponding value from column number 2. For example, if you replace it with Orange, Excel will return 3 in cell F1. However, if you replace it with a value not in the range of cells such as Mango or just leave it blank, Excel will return #N\/A in cell F1. This is how you use the VLOOKUP function to find an exact match from the range of cells.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Let\u2019s save the workbook to Chapter7.xlsx or any file name you prefer.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Go back to the worksheet and let\u2019s format the numbers to the Accounting format with the dollar sign ($) symbol. The Accounting format is the most popular format for numbers, especially for creating financial statements and budgets.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">See the Figures below to learn how to format the numbers to the Accounting format with the dollar sign ($) symbol.<\/p>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image2-6.png\" alt=\"image\" width=\"1378\" height=\"778\" \/><figcaption class=\"wp-caption-text\">Figure 7.2 Click and hold your mouse button on cell B2.<\/figcaption><\/figure>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image3-6.png\" alt=\"image\" width=\"1378\" height=\"777\" \/><figcaption class=\"wp-caption-text\">Figure 7.3 While holding the mouse button, drag the mouse pointer until cell B9.<\/figcaption><\/figure>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image4-5.png\" alt=\"image\" width=\"1378\" height=\"778\" \/><figcaption class=\"wp-caption-text\">Figure 7.4 Click an Accounting Number Format drop-down arrow.<\/figcaption><\/figure>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image5-5.png\" alt=\"image\" width=\"1378\" height=\"778\" \/><figcaption class=\"wp-caption-text\">Figure 7.5 Select $ English (United States) from the menu.<\/figcaption><\/figure>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" style=\"text-align: initial;font-size: 1em\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image6-4.png\" alt=\"image\" width=\"1378\" height=\"778\" \/><figcaption class=\"wp-caption-text\">Figure 7.6 The selected numbers are formatted to Accounting format.<\/figcaption><\/figure>\n<p class=\"import-MyText\" style=\"text-align: justify\">Now, you\u2019re done with formatting the numbers to Accounting format with a dollar symbol, $ English (United States).<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">You can format cell F1 to Accounting format with the same steps as described in the above Figures.<\/p>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image7-4.png\" alt=\"image\" width=\"1378\" height=\"778\" \/><figcaption class=\"wp-caption-text\">Figure 7.7 Format cell F1 to Accounting format.<\/figcaption><\/figure>\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">You can change to another symbol depending on which currency you prefer.<\/span><\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">The second example of the VLOOKUP function is to search for approximate matches.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Before you proceed with the example, rename the current worksheet to Fruits. See the Figure below.<\/p>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image8-4.png\" alt=\"image\" width=\"1378\" height=\"778\" \/><figcaption class=\"wp-caption-text\">Figure 7.8 Rename the current worksheet to Fruits.<\/figcaption><\/figure>\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Then, insert the new worksheet and rename it to Sales and Commissions. See the Figure below.<\/span><\/p>\n<figure style=\"width: 1378px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image9-3.png\" alt=\"image\" width=\"1378\" height=\"776\" \/><figcaption class=\"wp-caption-text\">Figure 7.9 Create a new worksheet and rename it to Sales and Commissions.<\/figcaption><\/figure>\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">The second example of the VLOOKUP function which is to search for approximate matches allows you to determine the commission rate in percentage (%) based on the sales made by each salesperson. See the Figure below.\u00a0<\/span><\/p>\n<figure style=\"width: 1379px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image10-3.png\" alt=\"image\" width=\"1379\" height=\"777\" \/><figcaption class=\"wp-caption-text\">Figure 7.10 Type the contents and the formula using the VLOOKUP function.<\/figcaption><\/figure>\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Type the contents in their respective cells. Use the default font and font size. You may bold and centre the content in each cell as shown in the Figure. Adjust any column width if necessary. You can format the numbers in Accounting format as described previously. In cell G2, type the formula using the VLOOKUP function, =VLOOKUP(F2,$A$2:$B$7,2,TRUE). Press Enter and you get the result.<\/span><\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Using the VLOOKUP function, Excel looks for any matched value in the range of cells from cell A2 until cell A7 vertically based on the value in cell F2. If the value in cell A2 is approximately matched with any value in the range of cells from cell A2 until cell A7, the Sales column, Excel returns the corresponding value from column B, the Commissions column. In the formula, column A is column number 1, and column B is column number 2. That is why, the range of cells should be from A2 until B7 or written as $A$2:$B$7 in the formula.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Note that this time, you should insert a dollar symbol, ($) in the cells to make them absolute references, as you are going to copy and paste the formula using the Fill handle later for the other cells in the same column.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Column B or column number 2 is where the corresponding value is extracted. That is why, the column number in the formula is written as 2. The word TRUE in the formula instructs Excel to search for approximate matches from Column A, the Sales column, or column number 1.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">In this example, the value in cell F2 is $57,935.00, where it approximately matches or is greater than the value in cell A7, or the $55,000.00 breakpoint. Since the value or the lookup value in cell A7 is greater than the $55,000 breakpoint, and there is no breakpoint afterward, then Excel stays on that row. It then uses the column index number as written in the formula as number 2 to identify the column containing the value to return for the lookup value. The corresponding value from column number 2 is 8. Thus, Excel returns 8 in cell G2.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Do note that because Excel goes sequentially through the breakpoints. These breakpoints must be arranged from the lowest value to the highest value for ranges. If no exact match is found, Excel returns #N\/A.<\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">The Figure below shows when all Commissions have been calculated using the VLOOKUP function.<\/p>\n<figure style=\"width: 1436px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image11-2.png\" alt=\"image\" width=\"1436\" height=\"810\" \/><figcaption class=\"wp-caption-text\">Figure 7.11 All Commissions have been calculated using the VLOOKUP function.<\/figcaption><\/figure>\n<p class=\"import-MyFigureText\" style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Do observe in the above Figure, that Excel returns #N\/A in cell G8. This is because the value in cell G8 is no greater than the $5,000 breakpoint, thus no match and it is considered as no commission, or #N\/A.<\/span><\/p>\n<p class=\"import-MyText\" style=\"text-align: justify\">Now, let\u2019s edit cells B1 and G1 to insert (%) at the end of the word Commission to make them more understandable for the worksheet presentation, and later wrap text both contents. See the Figures below.<\/p>\n<figure style=\"width: 1379px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image12-2.png\" alt=\"image\" width=\"1379\" height=\"777\" \/><figcaption class=\"wp-caption-text\">Figure 7.12 Edit cell B1 and insert (%) at the end of the Commission.<\/figcaption><\/figure>\n<figure style=\"width: 1379px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" style=\"text-align: initial;font-size: 1em\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image13-2.png\" alt=\"image\" width=\"1379\" height=\"777\" \/><figcaption class=\"wp-caption-text\">Figure 7.13 Click the Wrap text button.<\/figcaption><\/figure>\n<figure style=\"width: 1379px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" style=\"text-align: initial;font-size: 1em\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image14-1.png\" alt=\"image\" width=\"1379\" height=\"777\" \/><figcaption class=\"wp-caption-text\">Figure 7.14 The content in cell B1 is wrapped in multiple lines.<\/figcaption><\/figure>\n<p class=\"import-MyText\" style=\"text-align: justify\">Follow the above Figures to edit cell G1 and to insert (%) at the end of the word Commission. Later, wrap the content in cell G1.<\/p>\n<figure style=\"width: 1379px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-content\/uploads\/sites\/112\/2024\/09\/image15-1.png\" alt=\"image\" width=\"1379\" height=\"777\" \/><figcaption class=\"wp-caption-text\">Figure 7.15 The content in cell G1 is wrapped in multiple lines.<\/figcaption><\/figure>\n<p class=\"import-MyText\" style=\"text-align: justify\">That\u2019s all for this Chapter.<\/p>\n<p class=\"import-NormalWeb\" style=\"text-align: justify\">You&#8217;re awesome!<\/p>\n<\/div>\n<div class=\"glossary\"><span class=\"screen-reader-text\" id=\"definition\">definition<\/span><template id=\"term_110_192\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_110_192\"><div tabindex=\"-1\"><p>The VLOOKUP function is used when you need to find things in a table or a range by row.<\/p>\n<\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><\/div>","protected":false},"author":91,"menu_order":7,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":"cc-by"},"chapter-type":[],"contributor":[],"license":[53],"class_list":["post-110","chapter","type-chapter","status-publish","hentry","license-cc-by"],"part":27,"_links":{"self":[{"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/pressbooks\/v2\/chapters\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/wp\/v2\/users\/91"}],"version-history":[{"count":2,"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/pressbooks\/v2\/chapters\/110\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/pressbooks\/v2\/chapters\/110\/revisions\/206"}],"part":[{"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/pressbooks\/v2\/parts\/27"}],"metadata":[{"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/pressbooks\/v2\/chapters\/110\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/pressbooks\/v2\/chapter-type?post=110"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/wp\/v2\/contributor?post=110"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/excelforabsolutebeginners\/wp-json\/wp\/v2\/license?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}