Take the prefix with LEFT
Step 1 of 3
Many codes are built from parts. In OSL-10422, the first three letters are the warehouse and the digits after the dash are the item number.
Click Continue when you're ready.
Already know it? Type the formula straight into B2.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product code | Warehouse | ||||
| 2 | OSL-10422 | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Need help?
Why this works
LEFT(A2,3) returns the first 3 characters of A2: "OSL". Without the second argument LEFT takes one character, so =LEFT(A2) gives just "O".
Common mistake: Leaving out the number of characters. LEFT then takes only the first one.
The answer
- B2
=LEFT(1A2,23)
In plain words: Take 2the first 3 characters of 1the product code in A2.
Use LEFT with the number of characters, for example =LEFT(A2,3) for the first three.
+10 points