grapher.GuardRangeRef
A multi-cell range used in an array-context condition.
Usage
grapher.GuardRangeRef()Array-context IF (SUM(IF(A1:A10>0,B1:B10,0)) and friends) evaluates its condition element-wise, so a range in the condition is not a value: it is a placeholder for the element aligned with the value element being guarded. A RangeRef is therefore a template node — instantiate_element_guard resolves it to a CellRef per element, and only the resolved scalar guards are ever attached to graph edges.
Those scalar guards mean the aligned value cell can change the result, not that Excel omits it from the calc chain. The engine still treats the whole value range as a precedent; the graph drops the edge from a value walk when the aligned condition is false so evaluation stays Excel-correct with fewer edges.
Parameter Attributes
key: NodeKey
Attributes
key: NodeKey-
Canonical range address, e.g.
Sheet1!A1:A10.
Attributes
| Name | Description |
|---|---|
| shape |
Return the range’s (n_rows, n_cols) extent.
|
shape
Return the range’s (n_rows, n_cols) extent.
shape: tuple[int, int]
Methods
| Name | Description |
|---|---|
| element() |
Return the CellRef at (row_offset, col_offset) within the range.
|
element()
Return the CellRef at (row_offset, col_offset) within the range.
Usage
element(row_offset, col_offset)Raises
IndexError- If the offsets fall outside the range.