TEXTBEFORE
returns text before a delimiter · from excel · excel: not yet compared · no sheets equivalent
signature
TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])
returns: text
| argument | required |
|---|---|
| text | required |
| delimiter | required |
| instance_num | optional · defaults to 1 |
| match_mode | optional |
| match_end | optional |
| if_not_found | optional |
examples
formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.
fx
=TEXTBEFORE("red-blue-green", "-") red errors
error values observed from the engine — each with a call that produces it.
| error | produced by |
|---|---|
| #N/A | =TEXTBEFORE("alpha", 2) |