# 2.4.42 CF

Office

The CF record specifies a conditional formatting rule.

0

1

2

3

4

5

6

7

8

9

1
0

1

2

3

4

5

6

7

8

9

2
0

1

2

3

4

5

6

7

8

9

3
0

1

ct

cp

cce1

cce2

rgbdxf (variable)

...

rgce1 (variable)

...

rgce2 (variable)

...

ct (1 byte): An unsigned integer that specifies the type of condition. MUST be a value from the following table:

Value

Meaning

0x01

Apply the conditional formatting when the comparison function specified by cp applied to the cell value, rgce1 and rgce2, evaluates to TRUE.

0x02

Apply the conditional formatting when the formula (section 2.2.2) specified by rgce1 evaluates to TRUE.

cp (1 byte): An unsigned integer that specifies the comparison function used when ct is equal to 0x01. In the following table, v represents the cell value, and v1 and v2 represent the results of evaluating the formulas specified by rgce1 and rgce2. The value of this field MUST be a value from the following table:

Value

Apply the conditional formatting if

0x01

v2 is greater than or equal to v1, and v is greater than or equal to v1 and less than or equal to v2

–Or–

v1 is greater than v2, and v is greater than or equal to v2 and less than or equal to v1

0x02

v2 is greater than or equal to v1, and v is less than v1 or greater than v2

–Or–

v1 is greater than v2, and v is less than v2 or greater than v1

0x03

v is equal to v1

0x04

v is not equal to v1

0x05

v is greater than v1

0x06

v is less than v1

0x07

v is greater than or equal to v1

0x08

v is less than or equal to v1

cce1 (2 bytes): An unsigned integer that specifies the size of rgce1 in bytes. MUST be less than or equal to 16409.

cce2 (2 bytes): An unsigned integer that specifies the size of rgce2 in bytes. MUST be zero when ct is equal to 0x02. MUST be zero when ct is equal to 0x01 and cp is greater than 0x02. MUST be less than or equal to 16409.

rgbdxf (variable): A DXFN structure that specifies the formatting to apply to a cell that fulfills the condition.

rgce1 (variable): A CFParsedFormulaNoCCE structure that specifies the first formula. If ct is equal to 0x01, this field is the first operand of the comparison. If ct is equal to 0x02, this formula is used to determine if the conditional formatting is applied. The size of rgce1 in bytes MUST be equal to cce1.

rgce2 (variable): A CFParsedFormulaNoCCE structure that specifies the formula that is the second operand of the comparison if ct is equal to 0x01 and cp is either equal to 0x01 or 0x02. The size of rgce2 in bytes MUST be equal to cce2.

Show: