Take the last digits with RIGHT
PremiumIn B2, use RIGHT to get the last four characters of the invoice in A2, the running number.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Invoice | Number | ||||
| 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
RIGHT(A2,4) returns the last 4 characters of A2: "0387". The result is text, so the leading zero stays. Wrap it in VALUE if you need the number 387.
Common mistake: Expecting a number back. LEFT, RIGHT and MID always return text, which is why the zero in "0387" is kept.
The answer
- B2
=RIGHT(1A2,24)
In plain words: Take 2the last 4 characters of 1the invoice in A2.