Statistica provides a predefined broad selection of case-state functions that can be used in spreadsheet formulas like all other functions.

Below is a list of all available case-state spreadsheet functions (parameters
are given in parentheses).

AsCaseState |
Converts its numeric argument into a 32 bit case state value. Case states are stored internally as 32 bit integers in the following format, where bit positions are number from 1 (the least significant bit) to 32:
Bits 6 through 13 form an 8 bit index (one based) into an internal color palette, with 0 meaning no color. Bits 14 through 19 are a 6 bit value that corresponds to a value of enum PlotMarkerType, in the STATISTICA type library. The value stored in these bits is (PlotMarkerTypeValue+1), with 0 meaning no marker assigned. For example:
| ||||||||||||||||||

BVal |
Extracts and returns the blue value from an RGB color value. | ||||||||||||||||||

CaseState |
Returns the case state value for the current case. Note: This
can be used, among other things, to write conditional expressions based
on current case states. For example, | ||||||||||||||||||

ColorOf |
Returns the index of the color in the case state value argument. For example:
returns V0 (modulo 65) | ||||||||||||||||||

ColorOfRGB |
Returns the color as RGB integer value in the case state value argument. | ||||||||||||||||||

ColorState( |
Returns a case state value with the color set to the nth color, modulo 65. The argument is an index into the color palette that displays in the case state color combo box on the spreadsheet toolbar. There are 65 such colors, and the indexing starts from 0. If the argument is larger than 65 the index is computed modulo 65. A negative argument wraps around, so that -1 is color number 65. Thus the spreadsheet formula. For example:
This will return case states with colors that cycle through the palette and repeat every 65 cases. | ||||||||||||||||||

ColorStateRGB |
Returns a case state value with the color set to the specified RGB value. See RGB function. For example:
This will return case state with color set to red. | ||||||||||||||||||

CombineStates |
Combines the case state arguments into one case state value. this function shall accept any number of arguments, each of which must be a case state value, and combines them into one case state. Boolean type states such as Labeled, Hidden, Excluded, etc, are OR'ed so that if any of the arguments has Hidden set, for example, this result will also have Hidden set:
| ||||||||||||||||||

Excluded |
Returns true if the case state value argument has the excluded flag set. | ||||||||||||||||||

ExcludedState |
Returns a case state value with the Excluded flag set if the argument is true. For example:
This will set every other row to a case state value with the excluded flag turned on. | ||||||||||||||||||

GVal |
Extracts and returns the green value from an RGB color value. | ||||||||||||||||||

Hidden |
Returns true if the case state value argument has the Hidden flag set. | ||||||||||||||||||

HiddenState |
Returns a case state value with the Hidden flag set if the argument is true. | ||||||||||||||||||

Labeled |
Returns true if the case state value argument has the Labeled flag set. | ||||||||||||||||||

LabeledState |
Returns a case state value with the Labeled flag set if the argument is true. | ||||||||||||||||||

Marked |
Returns true if the case state value argument has the Marked flag set. | ||||||||||||||||||

MarkedState |
Returns a case state value with the Marked flag set if the argument is true. | ||||||||||||||||||

MarkerOf |
Returns the index of the Marker in the case state value argument. For example:
returns V0 (modulo 10, since there are 10 markers.) | ||||||||||||||||||

MarkerState |
Returns a case state value with the marker set to the nth marker, modulo 10. | ||||||||||||||||||

RGB |
Constructs an RGB value from the integer arguments, which must be in [0,255]. For example:
Internally, RGB values are stored as 32 bit integers in the hex form 0x00BBGGRR where BB is the 8 bit blue value from 0-255 decimal, etc. | ||||||||||||||||||

RVal |
Extracts and returns the red value from an RGB color value. For example:
| ||||||||||||||||||

Selected |
Returns true if the case state value argument has the Selected flag set. | ||||||||||||||||||

SelectedState |
Returns a case state value with the Selected flag set if the argument is true. |

See also: __Distributions and their Functions__, __Spreadsheet Formulas - Overview__, __Spreadsheet Formulas - Syntax Summary__, __Spreadsheet Formulas - Examples__, __Spreadsheet Formulas - Syntax Operators__, __Spreadsheet Formulas - Distributions
and their Functions__.