A `.split()` function for excel—assumes 0 index, "-" delimiter, and reference cell "A2" but are all customizable. Outputs a string representation of the formula
✓ Published0🌍 Public
BBBischof
Last edited Sep 13, 2017
Created on Sep 13, 2017
This example generates spreadsheet formulas that split text from a reference cell into separate parts. It shows a Python function that recursively builds nested Excel-style `SEARCH`, `LEFT`, and `MID` calls. The code defines `build(i, delimiter='"-"', reference_cell="A2")`, which assumes a zero-based index and a hyphen delimiter, but all parameters are customizable. The output is a string representation of the formula, constructed through the helper `recurse` to incrementally locate delimiter positions. It does not execute or render the formula; it only produces the textual formula string.
AI-generated description