# GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators

## Content

# Enumeration: GeneralComparisonOperators

[Sheets](../modules/GC.Spread.Sheets).[ConditionalFormatting](../modules/GC.Spread.Sheets.ConditionalFormatting).GeneralComparisonOperators

Specifies the general operator.

**`example`**
```
//This example validates a cell value.
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
nCondition.expected(0);
//When the option is false, the validation fails and the red alert is displayed.
//When the option is true, the blank cell is treated as zero and the validation is successful.
nCondition.treatNullValueAsZero(false);
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
validator.ignoreBlank(false);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, null);
alert(validator.value2());
```

## Table of contents

### Enumeration members

- [equalsTo](GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators#equalsto)
- [greaterThan](GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators#greaterthan)
- [greaterThanOrEqualsTo](GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators#greaterthanorequalsto)
- [lessThan](GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators#lessthan)
- [lessThanOrEqualsTo](GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators#lessthanorequalsto)
- [notEqualsTo](GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators#notequalsto)

## Enumeration members

### <a id="equalsto" name="equalsto"></a> equalsTo

• **equalsTo** = `0`

Indicates whether the number is equal to a specified number.

___

### <a id="greaterthan" name="greaterthan"></a> greaterThan

• **greaterThan** = `2`

Indicates whether the number is greater than a specified number.

___

### <a id="greaterthanorequalsto" name="greaterthanorequalsto"></a> greaterThanOrEqualsTo

• **greaterThanOrEqualsTo** = `3`

Indicates whether the number is greater than or equal to a specified number.

___

### <a id="lessthan" name="lessthan"></a> lessThan

• **lessThan** = `4`

Indicates whether the number is less than a specified number.

___

### <a id="lessthanorequalsto" name="lessthanorequalsto"></a> lessThanOrEqualsTo

• **lessThanOrEqualsTo** = `5`

Indicates whether the number is less than or equal to a specified number.

___

### <a id="notequalsto" name="notequalsto"></a> notEqualsTo

• **notEqualsTo** = `1`

Indicates whether the number is not equal to a specified number.
