Take the year from the middle with MID
PremiumThe year in the invoice in A2 starts at character 5 and is 4 characters long. In B2, use MID to get it.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Invoice | Year | ||||
| 2 | INV-2024-0387 | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Premium lesson
Unlock LEFT, RIGHT and MID and every other lesson
This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.
It comes up in this mock test: Excel test for admin jobs
Your first month for $9.50 $19
50% off your first month when you join today.
Then $19/month. Cancel any time, and get a full refund within 14 days if it isn't for you.
Why this works
MID(A2,5,4) starts at character 5 of A2 and returns 4 characters. "INV-" is characters 1 to 4, so character 5 is the "2" that starts the year.
Common mistake: Counting the start from zero. MID counts the first character as 1.
The answer
- B2
=MID(1A2,25,34)
In plain words: Take 34 characters of 1the invoice in A2, 2starting at character 5.