Exp19_Excel_Ch12_Cap_Inventory
You are the operations manager for Bulldog collectables, a small start-up company that deals with sports memorabilia. As you prepare to document your inventory, you decide to utilize a template to save time. To complete this task, you will create a worksheet based on an Office.com template; you will also use the Macro Recorder and Visual Basic for Application to automate sorting and calculations within the workbook. #Start Excel. Download and open the file named EXP19_Excel_Ch12_Cap_Inventory.xlsx. Grader has automatically added your last name to the beginning of the filename. Delete the Inventory Pick List and Bin Lookup worksheets. #Delete the INVENTORY PICK LIST and BIN LOOKUP icons located respectively in cells E2 and F2. Then Clear all existing Data Validation in the range A1:K15. Delete the values in the range B5:J15. #Record a macro named Sort, be sure to use relative references. Ensure the macro sorts the data in the table in ascending order based on SKU (column A). Stop the Macro Recorder and Save the workbook as a Macro-Enabled Template. Create a form control button that spans the cell E2:E3. Assign the Sort macro and edit the button text to Sort. #Use the VBA Editor to create a new module. #Type the following VBA code to create a custom Inventory Value function then save and exit the VBA Editor (be sure to leave a blank line between each line and before End Function): Function InventoryValue (QTY, COST) InventoryValue = QTY * COST #Click cell J5 and use the newly created InventoryValue function to calculate the value of the inventory for each item in column I. Use the VBA Editor to create a new module named ProtectWorkbook. Type the following VBA statements to create the sub procedure (leave appropriate line spacing). Sub ProtectWorkbook() ‘Protect workbook using the password eXploring Worksheets(“Inventory List”).Protect Password:=”eXploring” Insert a new module named UnprotectWorkbook. Type the following VBA statements to create the sub procedure and then save and exit the VBA Editor (leave appropriate line spacing). Sub UnprotectWorkbook() ‘Unprotect workbook using the password eXploring Worksheets(“Inventory List”).Unprotect Password:=”eXploring” #Insert a Form Control Button spanning cells F2:F3 named Unprotect. Assign the UnprotectWorkbook macro to the newly created Control Button. Insert a Form Control Button spanning the range G2:H3 named Protect. Assign the macro ProtectWorkbook. Insert the comment Inventory based on values in column J. in cell B3 (include the period). Insert the comment Count of items in column C. in cell C3 (include the period). Inspect the document for private information and hidden properties. Save the file when prompted then remove Document Properties and Personal Information, and Headers and Footers. Close EXP19_Excel_Ch12_CAP_Inventory.xlsx. Exit Excel. Submit the file as directed.