Tìm kiếm mục tiêu là một chức năng tiêu chuẩn được tìm thấy trên menu Tools có một số tiêu chí xem xét và giúp tìm đúng giá trị tính toán. Ví dụ này cho thấy việc kiểm soát chất lượng của một hoạt động sản xuất, nhập công thức để tính toán có bao nhiêu sản phẩm là cần thiết để đạt được mục tiêu sản xuất. | Use Goal Seek as a powerful analysis tool Goal Seek is a standard function found on the Tools menu that takes several criteria into consideration and helps find the correct value of a calculation. This example shows the quality control of a production run. The monitoring process sorts out products that don t meet the expected quality standards. The first time we check the quality we find that 5 of the production does not meet quality standards and the second time we find that 2 of the production fails to meet standards. How many more products have to be produced to reach the required amount of 1030 Use Goal Seek to determine the total amount of production needed 1. In cell C3 enter 1030 as the production goal. 2. In cell C4 type the formula C3 . 3. In cell C5 enter the formula C3-C4 to calculate how many products are needed to reach the production goal. 4. In cell C6 type the formula C5 . 5. Calculate the final sum in cell C7 with the formula C5-C6. C7 Â C5-C6 A B c I 1 2 3 production 1 4 Quality check 1 Loss of 5 5 items after passing quality gate 1 6 Quality check 2 Loss of 2 7 items which meet the customers specification 8 Figure 12-6 6. On the Tools menu click Goal Seek. 7. In the Goal Seek dialog box enter C7 in the Set cell field. Special Solutions with Formulas 311 8. Enter 1030 in the To value field and enter C3 in the By changing cell field. 9. Press OK. Figure 12-7 312 Chapter 12 Use a custom function to shade all cells containing formulas The remaining tips in this chapter describe the usage of Visual Basic Application VBA macros to enhance and optimize Excel worksheets. For the first example we ll write a macro that shades all cells containing formulas. To shade all cells with formulas 1. Press Alt F11 to open the Visual Basic Editor. 2. On the Insert menu click Module. 3. Type the following macro Sub ColorThem xlCellTypeFormulas .Select With .ColorIndex 44 .Pattern .