The two grammars a formula-backed field can enforce.
'formula' — any formula expression (=SUM(A1:A5)*2). The field text is one expression; the
picker projects the expression's REFERENCES (per token) and a pick re-scopes the caret's
reference or splices a new one at the caret — the formula editor's point model.
'reference' — a pure reference list (Sheet1!A1:B2, Sheet2!C1). The field text is comma-joined
reference segments; the picker projects the SEGMENTS (segment index = picker range index) and a
pick re-scopes/appends a segment. Function calls and computed expressions are invalid — the field
accepts only what ICalculation.IFormula.isReferenceOnly holds for (Excel's RefEdit
contract: OFFSET/INDIRECT-style computed references are not accepted; those belong in a
'formula' field, e.g. a name's refers-to).
The two grammars a formula-backed field can enforce.
'formula'— any formula expression (=SUM(A1:A5)*2). The field text is one expression; the picker projects the expression's REFERENCES (per token) and a pick re-scopes the caret's reference or splices a new one at the caret — the formula editor's point model.'reference'— a pure reference list (Sheet1!A1:B2, Sheet2!C1). The field text is comma-joined reference segments; the picker projects the SEGMENTS (segment index = picker range index) and a pick re-scopes/appends a segment. Function calls and computed expressions are invalid — the field accepts only what ICalculation.IFormula.isReferenceOnly holds for (Excel's RefEdit contract: OFFSET/INDIRECT-style computed references are not accepted; those belong in a'formula'field, e.g. a name's refers-to).