Text Functions
Advanced

MID between two separators

Pull the middle section out of a code when every part varies in length.

Task:

Order references look like REGION-NUMBER-SUFFIX, and each part can be a different length. In B2:B6 extract just the number between the two hyphens.

Hints

+5 XPno-hints bonus

Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

6 rows × 2 columns5 cells you fill in
AB
1ReferenceOrder no.
2UK-4471-B
3IE-90213-RTN
4FR-38-X
5DE-1150-B
6NL-702945-EXP
What this exercise teachesMay contain the answer

MID needs a start and a length, and here both depend on the row. Searching for the second hyphen from just after the first is the key move. The result is text — wrap it in VALUE if you need to do arithmetic with it.