Declaration: TDataTable.IfAnyCellHasCellState (LowCol, LowRow, HighCol, HighRow: integer; CellState: byte): boolean;
The function IfAnyCellHasCellState returns TRUE if any of the cells in the range specified by the parameters LowCol, LowRow, HighCol and HighRow contains a cell state which matches the state mask defined by the parameter CellState.

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.

Example: The statement test := IfAnyCellHasCellState (0,0,0,0, $A0); assigns a TRUE value to the variable "test" if at least one of the cells has either bit 7 or bit 5 set to 1 ($A0 = 10100000).