HOW TO: Use Wildcard Characters in Microsoft Excel 2000 Parameter Queries

Article translations Article translations
Article ID: 211459 - View products that this article applies to.
This article was previously published under Q211459
Expand all | Collapse all

On This Page

SUMMARY

This article describes various wildcard characters that you can use in parameter queries in Microsoft Query.

A parameter query, when you run it, prompts for values (criteria) to use to select the records for the result set so that the same query can be used to retrieve different result sets. By using a parameter query, you do not have to change the query design grid each time that you run the query. Instead, Microsoft Query prompts you for the search criteria. You can specify multiple parameters for a field.

Microsoft Query Wildcard Character Examples

In the Criteria cell under each field that you want to use as a parameter, type a prompt that is enclosed in square brackets. Microsoft Query displays this prompt when you run the query. The text of the prompt must be different from the field name; however, the prompt can include the field name.

The wildcard characters that are available in Microsoft Query and examples for using these characters in a parameter query are listed in the following table.

 Wildcard                              Parameter
 character    Definition               query example
 ---------------------------------------------------------------------

 +            Addition                 [Enter Price]+[Cost of Freight]

 -            Subtraction              [Enter Price]-[Cost of Freight]

 *            Multiplication           [Enter Price]*[Enter Quantity]

 /            Division                 [Enter Price]/[Enter Quantity]

 =            Equal to                 =[What city?]

 <>           Not equal to             <>[All cities but what?]

 >            Greater than             >[Greater than date?]

 <            Less than                <[Less than date?]

 >=           Greater than or
              equal to                 >=[Greater than or equal to date?]

 <=           Less than or
              equal to                 <=[Less than or equal to date?]

 And          Both values found        >[Greater than date?] And
              in the record set        <[Less than date?]

 Or           Either value found
              in the record set        [What city?] Or [What other city?]

 Not          Value not found
              in the record set        Not [All cities but what?]

 Between      Range of values          Between [start date] and
              between what two values  [end date]

 Like         Compares values to       Like [Enter letter(s) followed by
              find a similar value     the % sign (for example, abc%)]

 In           Equal to several values  In ([first],[second],[third])
              in a list
				

REFERENCES

For more information about parameter queries, click Microsoft Query Help on the Help menu, type Create a new query in the Office Assistant or the Answer Wizard, and then click Search to view the topic.


Properties

Article ID: 211459 - Last Review: November 5, 2003 - Revision: 3.0
APPLIES TO
  • Microsoft Excel 2000 Standard Edition
Keywords: 
kbhowto kbhowtomaster kbualink97 KB211459

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com