Spreadsheet Case Selection Conditions

Click the Cases button in the Create a Subset dialog box, or click the SELECT CASES button in the Unstacking/Stacking dialog box to display the Spreadsheet Case Selection Conditions dialog box.

This dialog box can also be displayed in the following ways:
  • Ribbon bar. Select the Data tab. In the Transformations group, click Auto Filter and from the menu, select Set as Selection Conditions to display the Spreadsheet Case Selection Conditions dialog box.
  • Classic menus. From the Data - Auto Filter submenu, select Set as Selection Conditions to display the Spreadsheet Case Selection Conditions dialog box.
From this dialog box you can specify, using case selections, which cases you want to include in the subset.
Option Description
Enable Selection Conditions Select the Enable Selection Conditions check box to activate and/or create case selection conditions.
Include cases Use the options in the Include cases group box to specify which cases to include in the analysis.
All Select the All option button to include all cases in the analysis.
Specific, selected by Select the Specific, selected by option button to include cases in the analysis that satisfy the conditions in the Expression or the or case number boxes. Note: It is possible to enter conditions in both the Expression and the or case number boxes, and when both boxes contain entries, cases that satisfy either condition are included. Example: in the example data set Adstudy.sta, if you use the include expression Gender='Male' and set the or case number field to 1-25, cases 1-25 will be selected, as well as any other cases where the value in the Gender column is 'Male'.
Expression Use the Expression box to enter new or edit existing case selection condition expressions. Refer to the Case Selection Conditions Syntax Summary for information on how to properly specify case selection expressions.
or case number Use the or case number box to include a specific subset of cases in your case selection conditions. You can enter case numbers and/or a range of case numbers separated by commas.
Exclude cases (from the set of cases defined in the 'Include cases' section) Use the options in the Exclude cases group box to exclude cases from the analyses that satisfy the conditions in the By expression or the or case number boxes. Note: It is possible to enter conditions in both the By expression and the or case number boxes, and when both boxes contain entries, cases that satisfy either condition are excluded. See the example above in the Specific, selected by option description.
By expression Use the By expression box to enter new or edit existing case selection condition expressions. Refer to the Case Selection Conditions Syntax Summary for information on how to properly specify case selection expressions.
or case number Use the or case number box to ensure that the case selection conditions are not applied to a specific subset of cases. You can enter case numbers and/or a range of case numbers separated by commas.
Review Variables Click the Review Variables button to display the Variables dialog box, from which you can view the variables in the spreadsheet.
Clear All Click the Clear All button to clear all boxes in this dialog box.
Open Click the Open button to display the standard open file dialog box, which is used to open a previously saved case selection condition file.
Save As Click the Save As button to display the standard save file dialog box, which is used to save case selection conditions in a file. Case selection conditions can later be opened using the Open button.
OK Click the OK button to set your selection conditions and return to the previous dialog box.
Cancel Click the Cancel button to return to the previous dialog box. Any changes made to the selection conditions will be disregarded.