TEXTBEFORE and TEXTAFTER replace the old FIND + MID combination. You give the separator, and Excel returns what is before or after it. No position to calculate, no length to count. These functions are available in Excel 365.
The following exercise shows you how to split texts with the modern text functions.
What you will practice in this exercise
You work on emails and references with separators. You answer 6 questions, one formula per question:
- What is before the @ (TEXTBEFORE)
- The domain, after the @ (TEXTAFTER)
- The first name, before the dot (TEXTBEFORE)
- The domain of another email (TEXTAFTER)
- The number after the second hyphen (instance number)
- The year between the two hyphens (nested functions)
Practice with exercises
TEXTBEFORE — Modern text functions
Split text without counting positions using TEXTBEFORE and TEXTAFTER.
Related articles
All the exercises in this series are based on real cases found on Excel forums. Each one answers a question that Excel users really ask.