LEFT, RIGHT, and MID
Key Takeaways
- LEFT(text, [num_chars]) returns characters from the start of a string; RIGHT returns characters from the end; omit num_chars and Excel returns 1 character
- MID(text, start_num, num_chars) extracts a middle slice; start_num is 1-based (the first character is position 1), and num_chars is required
- Use LEFT, RIGHT, and MID to pull product codes, region IDs, zip segments, and other fixed-position identifiers from longer text strings
- MO-210 tasks often ask you to extract a fixed-width code into a helper column—graders check the formula text, not only the displayed value
- Off-by-one errors on MID’s start_num are the most common failure; count carefully from the left before you enter the formula
Format and modify text on MO-210
Domain 4 of Exam MO-210 (Perform Operations by Using Formulas and Functions) includes the skill Format and modify text. At Associate level you must extract pieces of strings with LEFT, RIGHT, and MID, then place those results in cells or helper columns so other formulas can use them. Graders inspect the formula you enter—not only the finished label—so a wrong start_num or missing num_chars fails even when a nearby cell happens to look plausible.
Task wording often sounds like "In column B, extract the three-character product category from the start of each SKU", "Return the last four digits of the account number", or "Pull the middle department code from the employee ID." Those map directly to LEFT, RIGHT, and MID with the correct character counts.
LEFT — characters from the start
Syntax: LEFT(text, [num_chars])
- text — the string or cell reference that holds the full value.
- num_chars — optional; how many characters to return from the left. If you omit it, Excel returns 1 character.
LEFT always counts from the first character of the string. Spaces and punctuation count as characters, so LEFT("AB-100", 3) returns AB-, not AB1.
Worked example: category prefix from a SKU
| A (SKU) | B (Category) | |
|---|---|---|
| 1 | SKU | Category |
| 2 | HW-88421 | =LEFT(A2,2) → HW |
| 3 | SW-11009 | fill → SW |
| 4 | SV-55001 | fill → SV |
Enter =LEFT(A2,2) in B2 and fill down. Each row keeps only the two-letter category at the start of the SKU. If the task said "first three characters" you would use =LEFT(A2,3) and get HW-, SW-, and SV- including the hyphen.
Default of one character
=LEFT(A2) with no second argument returns only the first character (H, S, S in the table above). On MO-210, omitting num_chars when the prompt asks for a multi-character code is a frequent miss—always match the count in the instruction.
RIGHT — characters from the end
Syntax: RIGHT(text, [num_chars])
RIGHT mirrors LEFT but counts from the last character backward. Omit num_chars and you get one character from the end.
Worked example: last four of an account ID
| A (Account) | B (Last Four) | |
|---|---|---|
| 1 | Account | Last Four |
| 2 | ACC-9912345678 | =RIGHT(A2,4) → 5678 |
| 3 | ACC-7700001122 | fill → 1122 |
| 4 | ACC-3300987654 | fill → 7654 |
The prefix and middle digits are ignored; only the trailing four characters are returned. This pattern appears when tasks ask for a PIN fragment, a year suffix, or the last segment of a tracking number.
Trap: RIGHT does not skip delimiters
RIGHT does not understand hyphens as field separators. For ACC-9912345678, =RIGHT(A2,4) is correct for the last four digits. If you needed the digits after the hyphen as a variable-length field, you would need a different approach (for example combining RIGHT with LEN, which is outside the core LEFT/RIGHT/MID extraction pattern). On MO-210 Associate tasks, identifiers are usually fixed width, so a plain RIGHT with a stated count is enough.
MID — a slice from the middle
Syntax: MID(text, start_num, num_chars)
- text — the source string.
- start_num — the position of the first character to return. Position 1 is the first character (1-based indexing).
- num_chars — how many characters to return. Unlike LEFT/RIGHT, this argument is required.
Counting start_num correctly
For the string EMP-HR-0042:
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Character | E | M | P | - | H | R | - | 0 | 0 | 4 | 2 |
To extract the department code HR:
=MID(A2,5,2) → starts at position 5 (H) and takes 2 characters → HR.
If you accidentally use start_num of 4, you include the hyphen and get -H. If you use start_num of 6, you get R-. Off-by-one mistakes here are the top MID failure on practice and live projects.
Worked example: region and store from a location code
Suppose each location code is always 8 characters: two-letter region, two-digit district, four-digit store.
| A (Location Code) | B (Region) | C (District) | D (Store) | |
|---|---|---|---|---|
| 1 | Code | Region | District | Store |
| 2 | NW120845 | =LEFT(A2,2) | =MID(A2,3,2) | =RIGHT(A2,4) |
| 3 | SE050221 | fill | fill | fill |
Results for row 2: Region NW, District 12, Store 0845. Row 3: SE, 05, 0221. Notice district uses MID because it sits between the region and the store. You could also write store as =MID(A2,5,4); RIGHT(A2,4) is clearer when the piece is truly at the end.
Worked example: year from a fixed invoice ID
Invoice IDs follow INVYYYY##### (three-letter prefix, four-digit year, five-digit sequence), for example INV202600137.
| Goal | Formula | Result |
|---|---|---|
| Prefix | =LEFT(A2,3) | INV |
| Year | =MID(A2,4,4) | 2026 |
| Sequence | =RIGHT(A2,5) | 00137 |
Confirm positions: character 1–3 = INV, 4–7 = year, 8–12 = sequence. =MID(A2,4,4) starts at the first digit of the year and takes four characters.
Combining extraction formulas in one sheet
MO-210 projects often give one source column and ask for two or three extracted fields. Build each field with its own LEFT, RIGHT, or MID formula, then fill down. Do not type extracted codes as static text—graders look for live formulas that update if the source cell changes.
| A (Badge) | B (Site) | C (Role) | D (Badge #) | |
|---|---|---|---|---|
| 1 | Badge | Site | Role | Badge # |
| 2 | DAL-ANL-8841 | =LEFT(A2,3) | =MID(A2,5,3) | =RIGHT(A2,4) |
Badge DAL-ANL-8841 yields Site DAL, Role ANL, Badge # 8841. Hyphens occupy positions 4 and 8, so MID for the role starts at position 5, not 4.
Exam habits that protect your score
- Read the character count in the prompt — "first two," "last four," and "characters 3 through 5" map to different functions and arguments.
- Sketch positions for MID — write the string and number each character before choosing
start_num. - Remember MID requires three arguments —
=MID(A2,3)is incomplete; you must supplynum_chars. - Fill after the first correct formula — establish LEFT/RIGHT/MID correctly in row 2, then Auto Fill so relative references adjust.
- Spaces count — if source data has a leading space, LEFT returns that space unless you clean the text first.
Master these three functions and fixed-width ID scenarios, and you cover the extraction half of Format and modify text on MO-210.
Cell A2 contains the SKU HW-88421. Which formula returns only the two-letter category HW?
You need the last four digits of account ACC-9912345678 stored in A2. Which formula is correct?
Employee ID EMP-HR-0042 is in A2. Which formula extracts the two-letter department code HR?
Which statement about MID is true on MO-210 tasks?