Mysteries of the Excel Data Form

detectiveSomeone emailed me last week about problems with a range named Database. For reasons known only to the hamsters that operate my brain wheels, that reminded me of Excel’s Data Form. It’s a built-in data entry tool, that lists all the fields in a table, with entry boxes for some fields, and the formula results showing. You can scroll through the records, or find specific records, based on criteria.
DataForm01
It’s not a feature that I use too often, and when I looked for the Data Form command in the Excel 2007 Ribbon, it was missing! It looks like I’m not the only one who doesn’t use the Excel Data Form too often.

Access the Excel Data Form

Even though the Data Form command is missing from the Excel 2007 Ribbon, you can still use it. A quick way to open the Data Form is the keyboard shortcut:

  • Press Alt + D, then type O

If you use the Data Form frequently, you can add its icon to the Quick Access Toolbar (QAT). There are instructions here for customizing the Excel QAT. You’ll find the Form command in the “Commands Not in the Ribbon” category.
qatcustomizeform

Open the Excel Data Form

To open the Data Form, select a cell in a table on the worksheet, then use the keyboard shortcut (Alt + D, O) or the icon on the QAT. It doesn’t matter which cell in the table is selected — the Data Form opens at the first record.
DataForm02

Use the Excel Data Form

To open the Data Form, select a cell in a table on the worksheet, then use the keyboard shortcut (Alt + D, O) or the icon on the QAT. It doesn’t matter which cell in the table is selected — the Data Form opens at the first record.

  • To add a new record, click New, and enter the data
  • To scroll through the records, use the Up arrow and Down arrow keys, or use the scroll bar on the Data Form.
  • To edit a record, scroll to that record, and change the data in the entry boxes. While editing a record, you can click the Restore button, to restore the current values. To complete the edit, click Close, or move to the next record (scroll bar or arrow keys).
  • To delete a record, scroll to that record, then click the Delete button
  • To find a specific records, or the first record that meets your criteria, click the Criteria button, and enter the criteria, then click Find Prev or Find Next.

DataForm07

Data Form Quirks and Mysteries

Here are a few things about the database that might surprise you. If you know of any other quirks, please share them in the comments below.

  • If there is a range named Database on the worksheet, it will open in the Data Form, even you have selected a cell in a different table. Ah, that’s what reminded me of  Data Forms, when I got the Database question.

DataForm06

  • The width of the boxes in the Data Form is connected to the widest column in the underlying table. If you widen that column, the Data Form will adjust automatically.

DataForm03

  • If numeric columns are too narrow, and some cells show number signs, those number signs are shown in the Data Form, even if its data entry boxes are wide enough to show the number. And unlike the worksheet, where you can point to a cell with number signs, and see a popup with the value, there’s no such feature in the Data Form.

DataForm05

  • But even the number sign quirk has a quirk! Sometimes the numbers are shown in the Data Form, even if the numbers signs show on the worksheet. In the screen shot below, the Cost column is slightly wider, and now the numbers can be seen in the Data Form.

DataForm09

  • Data Validation lists, and other data validation settings, are ignored. For example, there’s a drop down list in the Product column on the worksheet, but not in the Data Form. You can type any value in the Product cell, despite the restrictions on the worksheet.

DataForm04

  • After editing a record, if you click Find Prev or Find Next, the changes are not saved.

Enhanced Data Form

If you like the built-in Excel Data Form, you’ll like John Walkenbach’s Enhanced Data Form even better. It’s a free download for the full version (either Excel 2007 and later, or Excel 2003 and earlier). If you want to see the code behind it, you can buy the VBA password for the bargain basement price of $15.

  • The J-Walk Enhanced Data Form automatically creates a drop down list, if the data validation list is based on a range with the same name as the field. In this example, the data validation list in column B is based on the Product named range.

DataForm08

  • Another benefit of the J-Walk Enhanced Data Form is that it opens at the record that’s currently selected.
  • Also, you can drag the bottom right corner, to adjust the size of the form, and the data entry boxes.

Do You Use the Data Form?

What about you — do you use the Excel Data Form? Did you know that it existed? Are there any other Data Form quirks that you know about?
___________