Contact

MID in Zoho Sheet: text-cleaning and order ID examples

Text Beginner Zoho Sheet

Extract a known segment from the middle of a structured order ID.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

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.

Availability and version history

  • Introduced: The original introduction version and date are not established by the checked sources.
  • Availability: Currently documented in Zoho Sheet’s rolling web-service help; no numbered release or retirement endpoint is established.
  • Scope: English-language web-service documentation. Mobile and offline-client parity is outside the verified scope.
  • Checked: October 14, 2026, against the official MID reference. Documentation and independent ASCII example checks; no native Zoho Sheet test.

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

Create a new blank sheet. Enter the three field names in A1:C1 and the eight records below in A2:C9. Do not enter the row-number column or surrounding backticks. Keep Order_ID as text; the customer and status columns are text too. No separate CSV is needed.

Row A: Order_ID B: Customer_Raw (␠ represents a space) 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; enter an ordinary space for each marker. Put formula results in a free column, such as D, rather than replacing source data. Spreadsheet row references shown below assume this table location.

Worked example with exact expected results

  1. Identify A2: CA-2026-0041.
  2. Count from the left: C=1, A=2, first hyphen=3, 2=4, 0=5, 2=6, 6=7.
  3. Type =MID(A2;4;4) into D2.
  4. Expected D2 result: 2026, a four-character text segment. Fill D2 through D9: every row returns 2026 because all eight 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: classify and reconstruct structured segments

Keep the extracted year in D2. In E2, enter the classification below, then fill E2 through E9:

=IF(MID(A2;4;4)="2026";"2026 batch";"Other batch")

All eight practice rows return 2026 batch. This labels a four-character segment; it does not parse a date or confirm the order is genuine.

For a separate alternative-year check, enter CA-2025-0041 in H2. Put =IF(MID(H2;4;4)="2026";"2026 batch";"Other batch") in I2; expect Other batch. The original A2 stays unchanged.

In F2, enter =MID(A2;4;4)&"-"&RIGHT(A2;4) and fill to F9. Expected labels are 2026-0041, 2026-0087, 2026-0129, 2026-1042, 2026-0205, 2026-0130, 2026-0420 and 2026-0011. These are text labels assembled from two positions, retaining each suffix’s leading zeros.

A fixed start is unsuitable if region prefixes can vary in length. The function extracts the requested positions; it does not discover the separators or repair a different code layout. Confirm that all records follow the assumed schema before interpreting the extracted segment as a year.

Common errors, limitations, and troubleshooting

  • Wrong segment returned: start measures 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=4 only 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.

Portability and boundary limits

The formulas use ASCII order IDs with known lengths. The Zoho reference does not fully specify Unicode/emoji character counting, fractional counts, blank inputs or every out-of-range start/count case. Compare representative data after import rather than borrowing another application’s boundary rules. Local formula separators can differ from the semicolons used in Zoho’s English examples.

LEFT · RIGHT · LEN · IF.

Function-specific sources