MID in Zoho Sheet: text-cleaning and order ID examples
Extract a known segment from the middle of a structured order ID.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Zoho Sheet. How formula examples are checked
MID function in Zoho Sheet
Quick answer: MID extracts text starting at a character position for a stated length. =MID(A2;4;4) returns 2026 from CA-2026-0041. It works well for consistently formatted IDs; it does not itself search for variable delimiters.
Formula syntax and parameter definitions
Zoho’s public reference displays:
=MID(text; start; number)
| Parameter | Meaning and practical notes |
|---|---|
text |
Original string or cell reference (A2). |
start |
Position where extraction begins; positions start at the first character, 1 in the basic text examples. |
number |
Number of characters to return from that starting position; specify explicitly. |
Use semicolons (;) as shown in these Zoho English help examples. A formula typed for a different spreadsheet application or locale may use a different separator; copy the function structure, not assumptions about separators.
Reproduce the examples: an eight-order practice sheet
Import the batch practice CSV (batches/zoho-sheet/2026-10-11T0546Z-text-batch06/order-ids-practice.csv, to be installed and linked by the owner during publication) into a new blank Zoho Sheet, starting in A1. It has headers in row 1 and records in rows 2–9. Import Order_ID as text so the four-digit ending stays padded with zeros. The other two columns are text; the spaces in customer names are intentional.
| Row | A: Order_ID | B: Customer_Raw (visible quotation marks are not part of cells) | C: Status |
|---|---|---|---|
| 2 | CA-2026-0041 |
␠␠East Depot␠␠ |
Open |
| 3 | US-2026-0087 |
West Market |
Closed |
| 4 | CA-2026-0129 |
␠␠North Hub␠ |
Open |
| 5 | GB-2026-1042 |
South Shop |
Hold |
| 6 | CA-2026-0205 |
East Depot |
Closed |
| 7 | US-2026-0130 |
␠␠West Market␠␠ |
Open |
| 8 | CA-2026-0420 |
Central Store |
Hold |
| 9 | GB-2026-0011 |
North Hub |
Closed |
The symbol ␠ in the display table represents one ordinary space. Do not type the symbol; the CSV contains actual spaces. Put formula results in a free column, such as D, rather than replacing source data. Spreadsheet row references shown below assume this import location.
Worked example with exact expected results
- Identify A2:
CA-2026-0041. - Count from the left:
C=1,A=2, first hyphen=3,2=4,0=5,2=6,6=7. - Type
=MID(A2;4;4)into D2. - Expected D2 result:
2026, a four-character text segment. When filled down, rows 3 and 4 also return2026because the practice IDs share this segment.
Other reproducible calls: =MID(A2;1;2) → CA; =MID(A2;9;4) → 0041; =MID("Functions";4;2) → ct (also present in Zoho’s example table). The extracted zeros remain text and need not be padded after extraction.
Advanced use in an order-processing workflow
Advanced: classify a structured batch year
In D2 enter:
=IF(MID(A2;4;4)="2026";"2026 batch";"Other batch")
Expected D2 result: 2026 batch. This labels the displayed year-like segment, but does not parse a date. If A2 is CA-2025-0041, the expected output becomes Other batch. All eight practice IDs use 2026, so all eight independently evaluate to 2026 batch.
To reconstruct an intentionally short label from two nonadjacent segments, =MID(A2;4;4)&"-"&RIGHT(A2;4) independently produces 2026-0041. This is an illustration of composing functions, and should be checked in Zoho before relying on it.
Common errors, limitations, and troubleshooting
- Wrong segment returned:
startmeasures character positions starting at the left of the original text, not spreadsheet column positions. A leading space shifts all fixed offsets. #NAME!: Surround literal text such as"Functions"with quotes. Verify function spelling.#VALUE!: Zoho lists invalid data types as potential causes. Its MID-specific reference does not describe every out-of-range start/count case; avoid zero/negative starts and negative lengths in examples unless tested natively.#REF!: Review moved/deleted references. A cell that already contains an error cannot provide usable source text.- Variable-width IDs: Fixed
start=4only makes sense for records whose first two characters and delimiter are always present. Consider a delimiter-aware extraction approach when the structure varies; do not silently label a malformed code as a date.
A dependable diagnosis is to try the direct quoted-string example first, then the A2/B2 cell reference, and finally the combined formula. This isolates input problems from reference problems and nested-formula problems. Calculated expectations are not native Zoho test reports.
Cross-software compatibility and alternatives
Excel’s MID documentation also uses a one-based start but documents additional boundary conditions such as start < 1 and negative num_chars that the cited Zoho page does not detail. These should not be presented as proved Zoho behaviours without a native check. Its published syntax uses comma separators, unlike Zoho’s shown semicolons. Verify multilingual/emoji character indexing when moving IDs between applications.
Zoho version and platform scope
This is a guide to the currently published online Zoho Sheet function reference, checked October 11, 2026, not a claim that every historical release, account tier, web/mobile/desktop client or offline file uses the same engine. Zoho’s public reference cited here does not state the first-supported product version. Zoho’s release notes describe Windows/macOS desktop apps (April 2026) and iPhone offline availability (August 2026), but do not establish this function’s exact cross-client parity. Confirm calculations in the actual target environment before relying on them for a workflow.
Related function tutorials
Direct sources
- Zoho Sheet official MID function help — syntax, definition, examples and documented errors; checked October 11, 2026.
- Zoho Sheet text function category — current index; checked October 11, 2026.
- Zoho Sheet release notes — contextual platform updates, not a claimed first support date; checked October 11, 2026.
- Microsoft Excel MID reference — boundary rules belonging specifically to Excel, checked October 11, 2026.
Official reference and verification
Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in Zoho Sheet.
- No genuine Zoho Sheet screenshots are included; this guide does not use mock application images.