
E00EX10.qxp 5/24/2010 1:55 AM Page 501 Workshops w Introduction The Workshops are all about being creative and thinking outside of the box. These workshops will help your right-brain soar, while making your left-brain happy; by explaining why things work the way they do. Exploring possibilities is great fun; however, always stay grounded with knowledge of how things work. Getting and Using the Project Files Each project in the Workshops includes a start file to help you get started with the project, and a final file to provide you with the results of the project so you can see how well you accomplished the task. Before you can use the project files, you need to download them from the Web. You can access the files at www.perspection.com in the software downloads area. After you download the files from the Web, uncompress the files into a folder on your hard drive to which you have easy access from your Microsoft Office program. Project 1: Creating a Drop-Down List Skills and Tools: Create a drop-down list Entering data in a worksheet can be tedious and repetitive. To make the job easier and get consis- tent accurate data, you can create a drop-down list of entries you define. To create a drop-down list, you create a list of valid entries in a single column or row without blanks, define a name, and then use the List option in the Data Validation dialog box. To enter data using a drop-down list, click the cell with the defined drop-down list, click the list arrow, and then click the entry you want. The Project In this project, you'll learn how to create a drop-down list from a named range of cells for use in conditional formatting. The Process 1 Open Excel 2010, open DropDown_start.xlsm, and then save it as DropDown.xlsm. 2 Click the Numbers tab. w 501 E00EX10.qxp 5/24/2010 1:56 AM Page 502 3 Select the cell range of 6 7 8 numbers in column A, (A1:A50). To create a drop-down list, you need a single column or row without blanks. 4 Click the Name box, type Numbers, and then press Enter. 5 Click the Form Controls Sheet tab. 6 Select cell B1. 7 Click the Data tab. 8 Click the Data Validation button. 9 Click the Settings tab. 5 9 10 10 Click the Allow list arrow, and then click List. 11 Click the Source box, and then type =Numbers. 12 Click OK. 13 Click the Name box, type StartNum, and then press Enter. 14 Select cell D2. 15 Repeat steps 8 through 13, and name the cell EndNum. 16 Select cell B1, click the drop-down list, and then select a number. 11 12 17 Select cell D1, click the 18 17 drop-down list, and then select a number. 18 Click the Save button on the Quick Access Toolbar. The Results Finish: Compare your completed project file with the results file w DropDown_results.xlsm. 502 Workshops E00EX10.qxp 5/24/2010 1:56 AM Page 503 Project 2: Adding a Form Control Skills and Tools: Insert a Form Control Form controls are objects that users can interact with to enter or manipulate data. A control is a component on a worksheet used to display information or accept user input. For example, you can add a Checkbox control to your worksheet so that users can turn an option on and off. You can select a control from the Developer tab and drag to create the control directly on your worksheet. The Project In this project, you'll learn how to insert a check box form control into a worksheet to control formatting. The Process 1 Open Excel 2010, open 8 4 3 2 FormControl_start.xlsm, and then save it as FormControl.xlsm. 2 Click the Developer tab. 3 Click the Design Mode button (highlighted), if available. 4 Click the Insert button, and then click the Check Box (Form Control); located on the top row. 5 Drag (pointer changes to a plus sign) to draw the form control in a blank area of the worksheet. When you point to a control in Excel, you will see the pointer cursor. To select a control, right-click the object, and then click off the menu. Check box 6 Select the check box object (if necessary), select the text to the right of the check box, and then press Delete. 7 Drag the right-middle resize handle (circles) to the size check box control to display only the check box. 8 Drag the check box control to cell E1 below the text Check box status. 9 Right-click the check box control, and then click Format Control. w Workshops 503 E00EX10.qxp 5/24/2010 1:57 AM Page 504 10 Click the Control tab. 11 10 11 Click the Checked option. 12 Click the Collapse Dialog button, click cell E2, and then click the Expand Dialog button. 13 Select the 3-D shading check box. 14 Click OK. 15 Select the check box control (if necessary), click the Name box, type a CheckBoxSwitch, and then press Enter. 16 Click the Design Mode button (not highlighted), and then click a blank cell to deselect the check box control. 13 12 14 17 Click the check box to turn it on and off. The contents of cell E2 toggles 18 17 16 between TRUE and FALSE. 18 Click the Save button on the Quick Access Toolbar. The Results Finish: Compare your completed project file with the results file FormControl_results.xlsm. Project 3: Adding Conditional Formatting Skills and Tools: Conditional Formatting You can make your worksheets more powerful by setting up conditional formatting, which lets the value of a cell determine its formatting. For example, you might want this year’s sales total to be dis- played in red and italics if it’s less than last year’s total, but in green and bold if it’s more. The for- matting is applied to the cell values only if the values meet the condition that you specify. Otherwise, no conditional formatting is applied to the cell values. The Project In this project, you'll learn how to add conditional formatting to a named range and include form w controls. 504 Workshops E00EX10.qxp 5/24/2010 1:57 AM Page 505 The Process 1 Open Excel 2010, open ConditionalFormat_start.xlsm, and then save it as ConditionalFormat.xlsm. 2 Select the cell range A3:A32. 5 3 Click the Home tab. 4 Click the Conditional Formatting button, and 6 then click New Rules. 5 Click Use a formula to determine which cells to format. 6 Type the formula 14 7 =AND($A3>=StartNum,$A3<=EndNum,CheckBoxSwitch) 7 Click Format. 8 Click the Fill tab. 9 Click Fill Effects. 8 10 9 13 11 12 10 Click the Color 2 list arrow, and then select a color. 11 Click a gradient option, and then select a gradient. 12 Click OK to close the Fill Effects dialog box. 13 Click OK to close the Format dialog box. w Workshops 505 E00EX10.qxp 5/24/2010 1:57 AM Page 506 14 Click OK. 15 Click the Conditional Formatting button, and then click Manage Rules. 16 Select the Stop If True check box to provide compatibility error checking. 17 Click OK. Conditional formatting rule 17 16 The Results Finish: Compare your completed project file with the results file ConditionalFormat_results.xlsm. Project 4: Creating a VBA Script Skills and Tools: Visual Basic for Applications script Instead of pressing the Caps Lock key every time you want to turn capitalization on and off, you can create a VBA script to change cell contents to upper case. This can be useful when you have col- umn data, such as two-letter US state abbreviations, in a worksheet. You can type the state abbre- viation in lower case and let the VBA script change it for you. The Project In this project, you'll learn how to create a VBA script to change cell contents in a designated range to uppercase. The Process 4 5 6 1 Open Excel 2010, open CAPS_start.xlsm, and then save it as CAPS.xlsm. 2 Click the Developer tab. 3 Click the Visual Basic button. 4 Double-click the Sheet1(Vendors) object. The Object windows opens. 5 Click the Object list arrow, and then click Worksheet. 6 Click the Properties list arrow, and then click w Change. 506 Workshops E00EX10.qxp 5/24/2010 1:58 AM Page 507 7 Type the VBA code that appears in the following illustration: Common Cell and Range References Reference Example Description Range(“A1”) Cell A1 Range(“A1:B5”) Cells A1 through B5 Range(“C5:D9,G9:H16”) Cells C5 through D9 and cells G9 through H16 Range(“A:A”), Range(“A:C”) Column A, Columns A through C Range(“1:1”), Range(“1:5”) Row 1, Rows 1 through 5 Range(“1:1,3:3,8:8”) Rows 1, 3, and 8 Range(“A:A,C:C,F:F) Columns A, C, and F) 8 Click the Save button on the 11 10 Standard toolbar. 9 Click the Close button on the Visual Basic Editor window to return to Excel. 10 Type state abbreviations in column E. After you press Enter, cell contents changes to uppercase. 11 Click the Save button on the Quick Access Toolbar. The Results Finish: Compare your completed project file with the results file CAPS_results.xlsm. w Workshops 507 E00EX10.qxp 5/24/2010 1:58 AM Page 508 Project 5: Creating a VBA Interface Skills and Tools: ActiveX Controls and Visual Basic for Applications (VBA) form An ActiveX control is a software component that adds functionality to an existing program.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages14 Page
-
File Size-