1. Home
  2. Restrict Units by Value

Restrict Units by Value

Select menu: Spread | Restrict/Filter | By Value

Use this to apply a restriction to the spreadsheet, based on values of the current column. The menu title bar indicates which column is to be used for the restriction.

Units are selected according to whether their values meet the specified criterion; the test is based on numerical values so can only be used for variate columns or factors displayed using their levels.

Restrictions can be applied to Matrices and Tables, although these structures cannot be restricted within the Genstat server. If the Subset on update option is selected, then a reduced matrix with restricted rows removed will be sent to the server. Otherwise the restrictions within the spreadsheet will be used for display purposes only and the full data will always be used within the server.

Choose units with values

You can select whether the restriction is based on units from the dropdown list, Equal to, Less than, or Greater than the specified values. Multiple values can be entered into the edit field in the equals case, and they should be separated with commas. For a factor, you can enter the ordinal values as the values to restrict by. You can either type the values in directly or select them automatically from a list by clicking in the edit field and pressing the up cursor key.

Restriction type

Units that meet the specified conditions can be either included or excluded from the restriction.

Existing restrictions

If this spreadsheet is currently restricted, this controls how the new restriction is added to the current restriction.

  • Combine with new – Combine the old restriction with the new one.
  • Replace with new – Replace the old restriction with the new one.

Remove all

Remove all existing restrictions from the spreadsheet.

Use factor

Whether to compare the factor Ordinals (i.e. 1,2,3…) or Levels with the values entered in the Choose units with values edit fields.


  • You can build complex conditions for the restriction by using the Apply button multiple times with the Existing restrictions combine option enabled. For example, specifying the value 20 with Greater than and applying this then the value 40 with Less than and then using OK will select units in the range (20,40).
  • You can form a restriction based on more than one column by selecting units for the first column, then make restrictions on subsequent columns with the Existing restrictions combine option enabled.

See also

Spreadsheet Restrict/Filter Menu for other methods of defining restrictions.
Restrict using Factor Levels
Restrict using Expression
Save Restriction/Filter
Understanding Factors within a Spreadsheet
Spreadsheet Restrict/Filter Menu
Restrict/Filter Duplicate Rows
Restrict/Filter Random Rows

The RESTRICT directive can be used to filter columns within the command language.

Updated on July 10, 2019

Was this article helpful?