Sei sulla pagina 1di 3

Comprehensive Exercise of Data Validation, Protection and Macros

Data File needed for the Review Assignments: TBall.xlsx


You did such a good job helping Sharon with the Youth Soccer application that she recommended you to
a friend, Terry Winkel, who has a similar project within the youth sports community. Terry wants to create
a receipt system for the Youth T-Ball league. Complete the following:
1. Open the TBall workbook located in the Excel7  Review folder included with your Data Files, and then
save the workbook as Youth TBall in the location specified by your instructor.
2. In the Documentation worksheet, enter your name and the date.
3. In the Receipt worksheet, do the following:
a. Create defined names from selection using the range A3:B11 to name all of the input cells.
b. Change the defined name Address to Street_Address.
c. Use the Name box to create the defined name Player_Sizes for the range D2:E8.
d. Paste the list of defined names in the Documentation worksheet.
4. Create the validation rules shown in Figure for the range B5:B7.

5. In the range B3:B11, enter the data shown in Figure


6. Enter the following formulas for the transfer area in the specified cells using the defined names you
created earlier:
Cell A37: =Parent
Cell B37: =Telephone
Cell C37: =Player_Name
Cell D37: =Age_Group
Cell E27: =Shirt_Size
Cell F27: =Hat_Size
7. Unlock the input cells on the Receipt worksheet so that the user can enter data only in the range
B3:B11.
8. Enter the following formulas in the specified cells to add information to the registration receipt:
Cell B26: =Parent
Cell B27: =Street_Address
Cell B28: =City_State_Zipc.
Cell B29: =Telephone
Cell E24: =Registration_Date
Cell E26: =Player_Name
Cell E27: =Age_Group
Cell E28: =Shirt_Size
Cell E29: =Hat_Size

9. In cell E33, enter a formula with an IF function. If the player is in the 4YO age group, the fee will
be the value in cell E11; otherwise, it will be the value in cell E12.
10. Protect the Documentation and Registration Data worksheets so that the user cannot enter data.
Do not use a password.
11. Add the DEVELOPER tab to the ribbon.
12. Save the workbook. If you have any trouble as you record the macros, you can close the
workbook without saving, open the workbook that you saved, and start with Step 13.
13. Create a macro named PDF_TBReceipt with Ctrl+r as the shortcut key. Store the macro in the
current workbook. Type Created 12/1/2016. Save receipt area: range A17:F34 as PDF file. as the
description. Record the following steps to create the PDF_TBReceipt macro:
a. Make the Receipt worksheet the active sheet.
b. Select the range A17:F34 and set the range as the print area.
c. Open the Page Setup dialog box.
d. Type T-Ball Registration Receipt in the center pane of the custom header.
e. Export the worksheet to create a PDF/XPS document with the filename Receipt saved to the
location specified by your instructor.
f. Close the PDF file.
g. Clear the print area.
h. In the Receipt worksheet, make cell B3 the active cell.
14. Remove worksheet protection from the Registration Data worksheet.
15. Create a macro named TransferData with Ctrl+t as the shortcut key. Store the macro in the current
workbook. Type Created 12/1/2016. Copy values in the transfer area of the Receipt worksheet to the
Registration Data worksheet. in the macro description. Record the following steps to create the
TransferData macro:
a. Make the Receipt worksheet the active worksheet.
b. Select the transfer area and copy it to the Clipboard.
c.Go to the Registration Data worksheet.
d. Click cell A1, and then go to the last row with values. (Hint: Press the Ctrl+ keys.)
e. On the DEVELOPER tab, turn on Use Relative References located on the DEVELOPER tab.
f. Move down one row.
g. Turn off Use Relative References.
h. Paste values in the Registration Data worksheet.
i. Click cell A1.
j. Turn on Use worksheet protection.
k. Go to the Receipt worksheet, and then make cell B3 the active cell.
16. Create a macro named ClearInput with Ctrl+i as the shortcut key. Store the macro in the current
workbook. Type Created 12/1/2016. Clear the values in the input area, range B3:B11. as the
description. Record the following steps to create the ClearInput macro:
a. In the Receipt worksheet, select the range B3:B11, and then delete the data from those cells.
b. Make cell B3 the active cell.
17. Test each macro using the shortcut keys you assigned to it.
18. Create a macro button for each of the three macros, and place them between the Registration
Data and the Receipt form on the Receipt worksheet. Assign the following labels to the macro
buttons:
a. Print PDF Receipt for the PDF_TBReceipt macro button
b. Transfer Data for the TransferData macro button
c. Clear Input for the ClearInput macro button
(Hint: You may need to remove cell protection to create the buttons and then reset it.)
19. Remove the DEVELOPER tab from the ribbon.
20. Test the macro buttons. Save the workbook as Youth TBall with Macros, a macro-enabled
workbook, and then close the workbook.

Potrebbero piacerti anche