Search and Replace
Menu location: Data_Cleaning and Encoding_Search and Replace.
This function searches for and replaces the values that you specify.
The advanced option allows you to use expressions such as:
"X<>21 and X>16"
"X=2 or X>25"
"(X=1 and X<=25) or (X=2 and X<=30)"
The expressions you can use are listed at user-defined functions.
If you want to apply search expressions to one variable / column and extract data in the matching rows of another column please see Extract a Subset of Data.
In addition, for filtering worksheet rows in the same way that Excel uses filters please see Filters.