Finding Records in Your Database

Databases that contain only a handful of records are easy to search; you simply display the database and then scan through it to find the desired record. Some databases, however, can contain hundreds or even thousands of records, making it nearly impossible , not to mention tedious , to track down a specific record.

Fortunately, Excel provides a tool that can help you locate records in your database. To find a particular record, follow these steps:

  1. Click any cell in the database that contains an entry.

  2. Open the Data menu and choose Form . The data form appears, displaying the first record in the database.

  3. Click the Criteria button. Excel displays a blank Criteria form, which you can use to search for a record.

  4. Click in the desired field (text box), and type an entry that is unique to the record you want to find, as shown in Figure 11.8. In a phone database, for example, you might click in the Last Name field and type the last name of the person whose record you want to find. (You need not type the entire entry; sometimes entering one to three characters is sufficient. You can also type entries in more than one field to narrow the search.)

    Figure 11.8. You can search for records using the Criteria form.

    graphics/11fig08.gif

  5. Click the Find Next button. Excel displays the first record in the database that matches the search entry you typed, as shown in Figure 11.9.

    Figure 11.9. Excel displays the first record in the database that matches your search entry.

    graphics/11fig09.gif

  6. To find the next record that matches your search entry, click Find Next . To find the previous record that matches your search entry, click Find Prev .

  7. When you are finished searching for records, click the Close button.

Excel also supports more general searches designed to turn up groups of records that match a range of criteria. For example, if you have a database of salespeople that includes each salesperson's total annual sales figures, you might enter >100000 (greater than 100,000) in the Sales field. The search would then return the records of all salespeople who had annual sales of more than $100,000. This type of criteria entry consists of a comparison operator (such as = or > or <), followed by a value or label entry. Table 11.1 shows the comparison operators that Excel supports.

Table 11.1. Excel's Comparison Operators

Operator

Meaning

=

Equal to

>

Greater than

<

Less than

>=

Greater than or equal to

<=

Less than or equal to

<>

Not equal to

You can also use the following wildcards when specifying criteria:

? Represents a single character

* Represents multiple characters

In the Name field, for instance, you might type M* to find everyone whose name begins with an M. To find everyone whose three-digit department code has 10 as the last two digits, type ?10 .



Absolute Beginner's Guide to Microsoft Office Excel 2003
Absolute Beginners Guide to Microsoft Office Excel 2003
ISBN: 0789729415
EAN: 2147483647
Year: 2002
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net