MinMaxOfMarkedCells

Declaration: TDataTable.MinMaxOfMarkedCells (LowCol, LowRow, HighCol, HighRow: integer; CellState: byte; var Minimum, Maximum: double): integer;
The method MinMaxOfMarkedCells calculates the minimum and the maximum of all data table elements within a specified range of cells which meet the following requirements: (1) they are not marked as csNAN, nor as csUndefined, (2) their cell state has to match the CellState parameter at least in one bit. Allowed states of the CellState parameter are csUser1, csUser2, csUser3, csImputed, csMarkedA, and csMarkedB.

The range of data table elements to be used is determined by the parameters LowRow, LowCol, HighRow, and HighCol. If any of these parameters receives an invalid value, this value is automatically adjusted to the nearest boundary value (either 1 or NrOfColumns / NrOfRows).

The variable parameters Minimum and Maximum return the minimum and the maximum of the selected data. The function returns the number of data points used for the calculation (i.e. the number of numeric data cells within the specified range).

Hint: Setting both the low and high parameter of a dimension (i.e. LowCol and HighCol) to zero values forces the method to use all elements of that dimension.