Microsoft KB Archive/64350

{| = Excel: Emulating Wildcards in Numeric Database Functions =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q64350

SUMMARY
If a criteria is in the form of &quot;text&quot;, Microsoft Excel will find or extract all records that contain &quot;text&quot; as a portion of the record. For example, &quot;braun&quot; and &quot;brown&quot; both meet the criteria of &quot;br&quot;.

Wildcard characters can be used to find database entries that share some characters but not others. By using the question mark (?), Excel will find any single character in the position of the wildcard. By using the asterisk (*), Excel will find any number of characters in the position of the wildcard.

Wildcard characters do not apply to numbers, however.

The LEFT, MID and/or RIGHT functions can be used in a computed criteria to emulate wildcards in database functions that use number entries.

For example, the following computed criteria can be used to perform database functions on all records that have an entry in the &quot;ZIP Code&quot; field starting with 995:

+---+  | ZIPCompute        | < Does NOT match a field name. (Required  +---+       of computed criteria.) | =LEFT(C2,3)=&quot;995&quot; | < LEFT function: &quot;C2&quot; is first record +---+      in &quot;ZIP Code&quot; field. Must be relative reference. Performing database functions using the above computed criteria will yield only those ZIP codes beginning with 995.

MORE INFORMATION
For more information on computed criteria, see pages 171-173 of the &quot;Microsoft Excel Reference&quot; version 2.20 manual or pages 144-145 of the &quot;Microsoft Excel User's Guide&quot; version 1.50 manual.

For more information in this database, query on the following words:

computed and criteria For more information on the LEFT, MID and RIGHT functions, see pages 51-52, 59-60, and 75, respectively, of the &quot;Microsoft Excel Functions and Macros&quot; version 2.20 manual. If you are using version 1.50, see pages 69, 76-77, and 90, respectively, of the &quot;Microsoft Excel Arrays, Functions, and Macros&quot; version 1.50 manual.
 * }