TEXTSPLIT function
Split a combined location and shift code.
Text
Where can you use it?
Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.
Scenario in the workbook
Split a code and region at the hyphen, then retrieve the second piece with INDEX.
A worked example from the workbook
| Row | A |
|---|---|
| 6 | Input |
| 7 | A-North |
| 8 | B-South |
| 9 | C-East |
Record 1
=INDEX(TEXTSPLIT(A7,"-"),1,2)Expected resultNorth
See the inputs and instructions for all 3 examplesCopyable formulas
English Excel · en-US
=TEXTSPLIT("L01|V3","|")Turkish Excel · tr-TR
=METİNBÖL("L01|V3";"|")Example and expected result
The result spills into two adjacent cells. Keep the output area clear. Available in Microsoft 365 and Excel 2024.
Expected result L01 and V3.
Worked examples
Split a code and region at the hyphen, then retrieve the second piece with INDEX.
Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.
| Row | A |
|---|---|
| 6 | Input |
| 7 | A-North |
| 8 | B-South |
| 9 | C-East |
| Case | Formula | Expected result |
|---|---|---|
| Record 1 | =INDEX(TEXTSPLIT(A7,"-"),1,2) |
North |
| Record 2 | =INDEX(TEXTSPLIT(A8,"-"),1,2) |
South |
| Record 3 | =INDEX(TEXTSPLIT(A9,"-"),1,2) |
East |