CRN: Nonresident Operands (5Ah)

The CRN record describes nonresident operands in a formula. For example, if you have a worksheet that contains the formula =EXT.XLS!A1*A3, where EXT.XLS is not the active workbook, the nonresident operand EXT.XLS!A1 generates a CRN record that describes cell A1. If the nonresident operand contains more than one row, there is one CRN record for each row. For example, if the formula =EXT.XLS!A1:A4*4 is array-entered on a worksheet, there will be four CRN records.

If a worksheet contains two different formulas and each formula has multiple nonresident operands, Microsoft Excel may create one CRN record or several CRN records, depending on how the nonresident cells are arranged. For example, suppose that a worksheet contains two formulas (in different cells), =EXT.XLS!A1*2 and =EXT.XLS!B1*2. Because the nonresident operands are in a row and are not separated by an empty cell, Microsoft Excel creates only one CRN record containing information about cells A1 and B1.

If, however, the formulas are =EXT.XLS!A1*2 and =EXT.XLS!C1*2, Microsoft Excel creates two CRN records because an empty cell (B1) separates the two operands, A1 and C1.

Record Data

Offset

Name

Size

Contents

4

colLast

1

Last column of the nonresident operand

5

colFirst

1

First column of the nonresident operand

6

rw

2

Row of the nonresident operand

8

OPER

var

OPER structure; see the following description


The OPER structure repeats for each cell in the nonresident operand. For example, the formula =SUM(EXT.XLS!A1:A3) produces one CRN record with three OPER structures.

OPER Structure If the Cell Contains a Number

Offset

Name

Size

Contents

0

grbit

1

= 01h for a cell that contains a number

1

num

8

IEEE floating-point number


OPER Structure If the Cell Contains a String

Offset

Name

Size

Contents

0

grbit

1

= 02h for a cell that contains a string

1

cch

1

Number of characters in the string

2

rgch

var

String


OPER Structure If the Cell Contains a Boolean Value

Offset

Name

Size

Contents

0

grbit

1

= 04h for a cell that contains a Boolean value

1

f

2

= 1 if TRUE
= 0 if FALSE

3

(unused)

6


OPER Structure If the Cell Contains an Error Value

Offset

Name

Size

Contents

0

grbit

1

= 10h for a cell that contains an error value

1

err

2

Error value

3

(unused)

6