Excel: Emulating Wildcards in Numeric Database FunctionsLast reviewed: November 2, 1994Article ID: Q64350 |
SUMMARYIf a criteria is in the form of "text", Microsoft Excel will find or extract all records that contain "text" as a portion of the record. For example, "braun" and "brown" both meet the criteria of "br". 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 "ZIP Code" field starting with 995:
+-------------------+ | ZIPCompute | <---- Does NOT match a field name. (Required +-------------------+ of computed criteria.) | =LEFT(C2,3)="995" | <---- LEFT() function: "C2" is first record +-------------------+ in "ZIP Code" field. Must be relative reference.Performing database functions using the above computed criteria will yield only those ZIP codes beginning with 995.
MORE INFORMATIONFor more information on computed criteria, see pages 171-173 of the "Microsoft Excel Reference" version 2.20 manual or pages 144-145 of the "Microsoft Excel User's Guide" version 1.50 manual. For more information in this database, query on the following words:
computed and criteriaFor more information on the LEFT(), MID() and RIGHT() functions, see pages 51-52, 59-60, and 75, respectively, of the "Microsoft Excel Functions and Macros" version 2.20 manual. If you are using version 1.50, see pages 69, 76-77, and 90, respectively, of the "Microsoft Excel Arrays, Functions, and Macros" version 1.50 manual.
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |