FORMULA (0x406) describes a cell that contains a formula.
offset name size contents 0 rw 2 Row 2 col 2 Column 4 ixfe 2 Index to the XF record 6 num 8 Current value of the formula 14 grbit 2 Option Flags 16 chn 4 (Reserved, must be zero) A field that specifies an application-specific cache of information. This cache exists for performance reasons only, and can be rebuilt based on information stored elsewhere in the file without affecting calculation results. 20 cce 2 Parsed Expression length 22 rgce cce Parsed Expression
The grbit field contains the following flags:
byte bits mask name asserted if 0 0 0x01 fAlwaysCalc the result must not be cached 1 0x02 fCalcOnLoad the cached value is incorrect 2 0x04 (Reserved) 3 0x08 fShrFmla this is a reference to a shared formula 7-4 0xF0 (Unused) 1 7-0 0xFF (Unused)
In most cases, formulas should have fAlwaysCalc asserted to ensure that correct values are displayed upon opening of the file in Excel.