A product code often hides several pieces of information. The first letters give the type, the last digits give the number. LEFT, RIGHT and MID cut the code into its parts, so you can sort, filter or count by each part.
The following exercise shows you how to extract parts of a text with LEFT, RIGHT, MID and LEN.
What you will practice in this exercise
You work on a product catalog with codes like PRD-ELC-001. You answer 6 questions, one formula per question:
- Extract the type: the first 3 letters (LEFT)
- Extract the number: the last 3 characters (RIGHT)
- Count the characters of the code (LEN)
- Extract the family in the middle (MID)
- Rebuild a short code: type + number (&)
- Extract the first letter of the description (LEFT)
Practice with exercises
Related articles
All the exercises in this series are based on real cases found on Excel forums. Each one answers a question that Excel users really ask.