Module 9 ยท Lesson 43
LEN, LEFT, and RIGHT
Measure and extract predictable parts of codes and references.
Read this LEN, LEFT, and RIGHT example
Start with the business need: Extract a department prefix from an account code. Read each argument, reference, field, or control in the example before copying it into a larger model.
=LEFT(A2,3)LEN, LEFT, and RIGHT: what Excel is actually doing
LEN counts characters, while LEFT and RIGHT extract a requested number from either end. These functions are useful when a code has a stable positional structure.
Your desk challenge for lesson 43
Extract a three-character prefix and two-character suffix, then use LEN to flag codes of the wrong length.
- Preserve the original imported field.
- Apply one cleanup or extraction rule per helper column.
- Compare row counts and inspect values that do not follow the expected pattern.
The LEN, LEFT, and RIGHT mistake to catch
Spaces and non-printing characters count toward LEN and can shift an extraction unexpectedly.
Evidence that your LEN, LEFT, and RIGHT result is trustworthy
Keep a raw-data column and count blanks, unexpected lengths, and unresolved patterns after cleaning.
- Explain how the result supports this task: Extract a department prefix from an account code.
- Retain one known-result check and one boundary or exception check.
- Record the source, period, unit, and refresh assumption beside the output.
Key takeaway: Extract a three-character prefix and two-character suffix, then use LEN to flag codes of the wrong length.