Syntax
=TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])Arguments
| Argument | Required | Description |
|---|---|---|
text | Required | The text to search |
delimiter | Required | The text that marks the point to cut at (an array gives several delimiters) |
instance_num | Optional | Which delimiter to use, from 1 (negative counts from the end; 1 when left out) |
match_mode | Optional | 0 match case (default), 1 ignore case |
match_end | Optional | 1 treats the end of the text as a delimiter |
if_not_found | Optional | The result when there is no match (#N/A when left out) |
How to use TEXTAFTER
TEXTAFTER takes 2 required arguments and 4 optional arguments. Type =TEXTAFTER( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=TEXTAFTER("Little Red Riding Hood", "Red ")Result =TEXTAFTER("Little Red Riding Hood", " ", -1)Result =TEXTAFTER("a-b", "x", 1, 0, 0, "none")Result Related text functions
- SPLITSplits text at a delimiter into a row of cells.
- SUBSTITUTEReplaces existing text with new text, everywhere or only in one occurrence.
- TReturns the value if it is text, otherwise empty text.
- TEXTFormats a number as text with a number format code, like "$#,##0.00" or "yyyy-mm-dd".
- TEXTBEFOREReturns the text that comes before a delimiter.
- TEXTJOINJoins texts and ranges with a delimiter between them, optionally skipping empty values.
- TEXTSPLITSplits text into columns and rows at the delimiters you give.
- TO_DATEReturns a number as a date value (the number itself; text and other values are returned unchanged).
- TO_DOLLARSReturns a number as a currency value (the number itself; other values are returned unchanged).