Pull the middle section out of a code when every part varies in length.
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.
Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.
The same formula in the other shapes it takes at work.
Extract parts of text using LEFT, RIGHT, and MID functions.
When the length changes from row to row, let FIND work it out.
Count from the end: total length minus where the space is.
Pull the middle section out of a code when every part varies in length.
This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.
| A | B | |
|---|---|---|
| 1 | Reference | Order no. |
| 2 | UK-4471-B | |
| 3 | IE-90213-RTN | |
| 4 | FR-38-X | |
| 5 | DE-1150-B | |
| 6 | NL-702945-EXP |
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.