{
  "category": "Operators",
  "display_name": "Range reference (:)",
  "entry_kind": "built_in_operator",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.OP_RANGE_REF",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Handled by the formula layer, which owns references; answers are recorded through whole formulas, not attributed to the operator.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": false,
    "state": "unmeasured",
    "state_label": "Implemented, no recorded answers attributed to it",
    "summary": "Implemented; no recorded answers are attributed to this entry",
    "workbook_corpus": null
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-fml/src/eval/refops.rs#L56-L74"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "eval/refops::reference",
        "eval/refops::references",
        "eval/refops::bounds",
        "eval/refops::area"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-fml/src/eval/refops.rs#L56-L74",
      "state": "unmeasured",
      "suite": null,
      "summary": "Implemented; no recorded answers are attributed to this entry"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.OP_RANGE_REF.json",
  "name": "OP_RANGE_REF",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- [`FUNC.OP_UNION_REF`](FUNC.OP_UNION_REF.md) — the comma; combines areas without merging\n  them into a bounding box.\n- [`FUNC.OP_INTERSECTION_REF`](FUNC.OP_INTERSECTION_REF.md) — the space; the meet operation\n  to this operator's join.\n- [`FUNC.OP_SPILL_REF`](FUNC.OP_SPILL_REF.md) — a different way to name a region, by anchor\n  rather than by corners.\n- `INDIRECT`, `OFFSET`, `INDEX` (reference form) — the reference-producing functions that can\n  supply either operand.\n- `ROW`, `COLUMN`, `ROWS`, `COLUMNS`, `AREAS`, `CELL` — the reference-inspecting functions\n  that consume the result without dereferencing it.\n- Structured references (`Table1[Amount]`) and defined names denote areas without using this\n  operator; they are separate reference shapes in chapter 01's table.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n- Normalize the corners. Store an area canonically (top-left, bottom-right) so that `B2:A1`\n  and `A1:B2` are the same value, and so that downstream equality of references works.\n- Keep the operands as references all the way in. An implementation that dereferences before\n  applying `:` cannot support `A1:INDEX(...)` at all, and that idiom is common enough to be a\n  correctness requirement rather than a nicety.\n- Absolute/relative markers (`$`) and sheet qualification belong to the reference value, not\n  to this operator. `:` composes whatever it is given; it must not normalize away anchoring.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n- **Non-reference operands.** No bounding box exists; the result is an error, not a\n  coercion.\n- **Cross-sheet operands.** `Sheet1:Sheet3!A1` is the three-dimensional reference shape of\n  chapter 01. Whether that is this operator applied to sheet names, or a separate grammar\n  form, is not settled in this Handbook's sources, and the contract's admitted slice does not\n  cover mixed-prefix composition.\n- **Result shape.** Always a single rectangular area. `:` cannot produce a multi-area\n  reference; that is [`FUNC.OP_UNION_REF`](FUNC.OP_UNION_REF.md).\n- **Deleted operands.** If either corner is invalidated (its rows or columns deleted), the\n  reference is no longer valid and `#REF!` is the documented error for that state\n  (chapter 01).\n- **Coercion and lifting do not apply.** This operator sits outside the scalar coercion\n  story; there is nothing to convert and nothing to broadcast.\n\n\n\n### Errors\n\n\n| Error | Condition |\n|---|---|\n| `#REF!` | An operand is not a usable reference, or the constructed reference is no longer valid. |\n| any incoming error | An error operand propagates. |\n\n",
    "sources": "- `data/presence/FUNC.OP_RANGE_REF.json` — implementing module\n  `earlier-implementation/operator_reference_family.rs`, the family slug for this\n  page.\n- Handbook `content/model/01-value-universe.md` (reference shapes, `#REF!`),\n  `03-call-pipeline.md` (operators are functions; reference-visible preparation).\n\n",
    "version-differences": "No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.",
    "what-it-does": "\n`A : B` takes two references and returns the smallest rectangular reference that contains\nboth — the *bounding box*, not the pair.\n\nThis is the most-used function in Excel and one of the least described. `A1:B10` is not\nnotation; it is a call. Chapter 03 says so explicitly: every evaluable operator is a function\nwith its own identity in the same catalog, and `:` is `FUNC.OP_RANGE_REF`.\n\nThree properties follow from \"smallest containing rectangle\":\n\n2. **The operands are corners, not endpoints of a path.** `A1:B10` covers 20 cells, not the\n   cells \"between\" A1 and B10 in reading order.\n\n\nThe contract records the admitted operand shapes as A1-style cells, areas, whole rows and\nwhole columns that parse through the local A1 reference substrate. Whole-row and\nwhole-column forms (`1:1`, `A:A`) are this same operator with row-only or column-only\noperands.\n\n\n\n### Arguments\n\n\n| Position | Name | Meaning |\n|---|---|---|\n| 0 | `A` | First corner reference. Required. |\n| 1 | `B` | Second corner reference. Required. |\n\nArity is exactly 2; no optional arguments, no defaults. Both operands must be\nreference-shaped: a number, text or logical operand is not a reference and has no bounding\nbox with anything.\n\nThe subtlety readers miss is that the operands need not be literal addresses. Reference-\nreturning expressions — `INDEX` in its reference form, `OFFSET`, `INDIRECT`, a defined name —\ncan appear on either side, which is how idioms like `A1:INDEX(A:A,n)` build a growing range\nwithout a volatile function. That works only because `:` receives references rather than\nvalues.\n\n\n"
  },
  "signature": {
    "display": "A:B",
    "parameters": [],
    "trailing_repeats": null
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "formula_layer",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "category": "Operators",
      "classification": {
        "arg_preparation_profile": "RefsVisibleInAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "RefOnly",
        "host_interaction_class": "WorkbookState",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": null,
        "short_source": "no-short-description"
      },
      "docs": null,
      "entry_kind": "built_in_operator",
      "localized_family_names": null,
      "localized_names": [],
      "signature": {
        "display": "A:B",
        "parameters": [],
        "trailing_repeats": null
      },
      "surface_name": "OP_RANGE_REF",
      "version_marker": null,
      "xlcall": null
    },
    "microsoft": null
  },
  "try_it": {
    "formula": "=SUM(B2:B4)",
    "inputs": {
      "B2": 1,
      "B3": 2,
      "B4": 3
    }
  },
  "url": "https://handbook.dnacalc.com/functions/OP_RANGE_REF.html",
  "variants": [],
  "versions": []
}