TEXTAFTER in Excel: what it does and how to use it
TEXTAFTER returns everything that follows a marker you name. Give it an at sign and it returns the domain; give it a space and it returns the surname.
Syntax
TEXTAFTER(text, delimiter, [instance_num])
text
The value to cut up, usually a cell reference.
delimiter
The marker to start after, in quotes. An at sign is "@", a space is " ".
instance_num
Which occurrence of that marker to start after. Left out it means the first. TEXTAFTER("a-b-c","-",2) returns c. A negative number counts back from the end, which is the neat way to take the last part of a name.
When to use it
Pulling the second half out of a value that has two halves: the domain from an email address, the surname from a full name, the unit from a measurement.
What trips people up
It needs Microsoft 365. Before that the job was done by MID with FIND, which works everywhere but is harder to read and easy to be off by one character.
Set by your computer's language, not by the file. A frequent cause of a correct-looking formula being rejected.
Excel version
XLOOKUP, IFS, TEXTBEFORE and TEXTJOIN need Microsoft 365 or 2021; older versions return #NAME? instead. Choosing the older one switches every walkthrough to a formula that works there.