Page 633 - Excel 2013 All-in-One For Dummies
P. 633
Filtering Data 615
Table 2-1
Operator
=
>
>=
<
<=
<>
The Comparative Operators in the Selection Criteria
Meaning
Equal to
Greater than
Greater than
Less than
Less than
Not equal to
Example
=“CA”
>m
>=3/4/02
<d
<=12/12/04
<>“CA”
Locates
Records where the state is CA
Records where the name starts with a letter after M (that is, N through Z)
Records where the date is on or after or equal to March 4, 2002
Records where the name begins with a letter before D (that is, A, B, or C)
Records where the date is on or before or equal to December 12, 2004
Records where the state is not equal toCA
To find all the records where a particular field is blank in the database, enter = and press the spacebar to enter a space in the cell beneath the appropri- ate field name. To find all the records where a particular field is not blank
in the database, enter <> and press the spacebar to enter a space in the cell beneath the appropriate field name.
Setting up logical AND and logical OR conditions
When you enter two or more criteria in the same row beneath different field names in the Criteria Range, Excel treats the criteria as a logical AND condi- tion and selects only those records that meet both of the criteria. Figure 2-5 shows an example of the results of a query that uses an AND condition. Here, Excel has copied only those records where the location is Boston and the date hired is before January 1, 2000, because both the criteria Boston and <1/1/00 are placed in the same row (row 2) under their respective field names, Location and Date Hired.
Book VI Chapter 2
Filtering and Querying a Data List