| A | B | C | D | E | F | G | H | I | J | K | L | M | N | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Code | Year | ||||||||||||
| 2 | AB-2024-XL | 2024 | ||||||||||||
| 3 | CD-2023-SM | |||||||||||||
| 4 | ||||||||||||||
| 5 | ||||||||||||||
| 6 | ||||||||||||||
| 7 | ||||||||||||||
| 8 | ||||||||||||||
| 9 | ||||||||||||||
| 10 | ||||||||||||||
| 11 | ||||||||||||||
| 12 | ||||||||||||||
| 13 | ||||||||||||||
| 14 | ||||||||||||||
| 15 | ||||||||||||||
| 16 | ||||||||||||||
| 17 | ||||||||||||||
| 18 | ||||||||||||||
| 19 | ||||||||||||||
| 20 | ||||||||||||||
| 21 | ||||||||||||||
| 22 | ||||||||||||||
| 23 | ||||||||||||||
| 24 | ||||||||||||||
| 25 | ||||||||||||||
| 26 | ||||||||||||||
| 27 | ||||||||||||||
| 28 | ||||||||||||||
| 29 | ||||||||||||||
| 30 |
More to try
Each of these works on the sheet. Press one to put it in B2.
- gives 2023
The same position in the next code.
- gives XL
A different start and length gives the size at the end.
- gives 2024
FIND locates the first dash, so the start does not have to be counted by hand.
Common mistakes
- Positions start at 1, not 0.
- The result is text, even when it looks like a year, so it will not sort or add as a number.
- Hard-coding positions when the layout varies. Find the separator instead.
Practise it
Take characters from the middle →Related functions