Finding a Delimiter
Part of the Formulas and Data Analysis section of Coddy's Excel journey. Lesson 23 of 28.
FIND(search_text, within_text) returns the one-based position of the first exact, case-sensitive match. A missing match raises an error. Combine the position with LEFT or MID to split simple text with a known delimiter.
B2 contains AB-123.
Example: =FIND("-",B2).
The hyphen is the third character, so the result is 3.
FIND returns a one-based position; subtract one to extract text before a delimiter.
The practice sheet highlights cells where you should enter formulas. The same formulas must work when the tests replace the input data.
Challenge
EasyCodes in B2:B4 each contain exactly one hyphen with a nonempty prefix. In C2:C4, return only the prefix before that hyphen.
Enter formulas in the highlighted output cells: C2, C3, C4. Keep the supplied data and headings. Tests change input values, so use cell references instead of typing the sample answers. Use English function names and commas between arguments.
Try it yourself
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Row | Code | Prefix | ||||
| 2 | 1 | AB-123 | |||||
| 3 | 2 | X-9 | |||||
| 4 | 3 | LONG-42 | |||||
| 5 | |||||||
| 6 | |||||||
| 7 | |||||||
| 8 | |||||||
| 9 | |||||||
| 10 | |||||||
| 11 | |||||||
| 12 | |||||||
| 13 | |||||||
| 14 |
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Formulas and Data Analysis
5Cleaning Imported Data
TRIM SpacesSUBSTITUTE TextFinding a DelimiterConverting Numeric TextRecap: Imported LabelsPractice on your own: Excel playground