TECHNOLOGY EXCEL By Bill Jelen Building a Fill-In Form in Excel There are several different techniques While in the Data Validation dialog, you can use to turn a simple worksheet tings tab, visit the Error Alert tab to cus- form in Excel into something much dropdown box to see other choices, such tomize the warning that appears when more user-friendly and effective. Using as Whole Number, Decimal, Date, Time, invalid data is entered. The Style drop- validation, protection, and a cool tab- Text Length, List, and Custom. Choosing down is important on this tab. Choos- order trick, you can build a form that any of these will cause a number of oth- ing “Stop” will prevent invalid data will allow others in your company to er settings to be available that allow you from being entered. You might want to submit specific information and prevent to specify upper and lower limits. By far, choose “Warning” or “Information,” the users from changing anything that the most interesting settings are List and which provide a warning message but isn’t an input cell. Custom. With the List choice, you can ultimately allow the user to decide if type a list of valid values that will be the value really should be allowed. Using Data Validation allowed in the selected cell. These values If a variety of people will be using the will then appear in a dropdown in the form, it’s helpful to include tooltips to cell. With the Custom choice, you can provide context-sensitive help, checks to write a logical formula that will test if prevent invalid data, and warnings the input value is valid. This formula can Protecting the Worksheet and Enabling Tab between Fields when invalid data is entered. All of do complex tests such as using the ISNA The protection plan in Excel may seem these elements can be added using the and VLOOKUP functions to see if a value a bit backwards. Every cell in Excel is Data Validation dialog box. for one cell is valid based on values initially set to have the “Locked” prop- entered in other cells. erty set to true. This seems counterin- It’s easy to provide a tooltip for any cell. Choose an input cell. In Excel 2003, go to Data, Validation. In Excel 2007, it’s Data, Data Validation. Go to the Input tuitive since anyone can change any Figure 1 cell in Excel. But Excel doesn’t pay attention to the Locked property until Message tab and enter the text you you explicitly enable protection for the want to display. This will appear just worksheet. below the cell anytime the cell is select- To unprotect the input cells, follow ed (see Figure 1). The tooltip contains a these steps: short title and then a paragraph provid- 1. Select the first input cell. ing guidance on how the person should 2. Hold down the Ctrl key while you enter data in the cell. 62 If you change anything on the Set- go to the Settings tab. Open the Allow S T R AT E G I C F I N A N C E I select the remaining input cells. June 2009 3. Press Ctrl+1 to open the Format Cells Figure 2 fields. Mentally number the fields from 1 to N. dialog. 4. On the Protection tab, uncheck 2. Ignore field #1 for a moment. Select Locked to unlock the input cells. field #2. 5. Click OK to close the Format Cells 3. Hold down the Ctrl key while you dialog. select fields 3, 4,…, N in the correct 6. In Excel 2007, select Review, Protect order. Yes—it really matters that you Sheet. In Excel 2003, select Tools, Pro- use the correct order! 4. Hold down the Ctrl key and select tection, Protect Sheet. 7. In the Protect Sheet dialog, uncheck Field #1 as the last field. 5. Click on the Name box, which is the the Select Locked Cells option and dropdown to the left of the formula click OK (Figure 2). bar. Type a new name, such as Step 7 is the key. By preventing “Data,” and press Enter. people from choosing locked cells, 6. Open the Name dropdown and you ensure that they can use the Tab choose the name you just entered. key to quickly jump to the next input ately motivated employee from getting a cell. look at the hidden data in the work- One note of caution, however: The 7. Save the workbook with the named Data range selected. book. Password-protecting a worksheet Protect Sheet dialog lets you use a pass- is roughly like securing your home by word to prevent others from unprotect- using a strip of duct tape across the fields selected in steps 2-4, and the tab ing the worksheet, but this password is front door. key will now follow the new sequence. particularly weak and often gives only a Excel will remember the order of the Using the techniques in this article, false sense of security. Given a few min- Changing the Tab Order you can create a better fill-in form using utes with Google and an older version of By default, the tab key will move left to Excel. SF Excel, most passwords can be removed right through a row and then from top in less than a minute. While the pass- to bottom through the worksheet. If you Bill Jelen is the host of MrExcel.com and word protection might be enough to need to alter the tab order, follow these the author of the new book, Excel keep your average sales rep from caus- steps: Gurus Gone Wild. Send questions for ing problems, it won’t keep the moder- 1. Map out the correct order for the future articles to IMA@MrExcel.com. June 2009 I S T R AT E G I C F I N A N C E 63