Contact

Zoho Sheet REPLACE: Change Characters at a Known Position

Text Intermediate Zoho Sheet

Understand position-based REPLACE syntax, predictable ID repairs, advanced nested formulas and error checks.

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

=REPLACE("CA_2026_0041";3;1;"-") has the expected result CA-2026_0041. Zoho Sheet REPLACE changes characters at a specified position. It does not search for every underscore; use SUBSTITUTE for a matching-text rule.

Availability and version history

  • Introduced: The original introduction release and date are not established by the checked sources.
  • Availability: Documented in Zoho Sheet’s current rolling web-service help; no final supported-version endpoint is established.
  • Scope: English-language web documentation. Historical releases, mobile and offline-client parity remain separately unverified.
  • Checked: October 14, 2026, against the official REPLACE entry. Explicit string and arithmetic examples were independently calculated; no native Zoho Sheet execution was performed.

Syntax: a start position and a removal length

REPLACE(original_text; start_position; length; new_text)

All four arguments are required. The start position identifies the first character to replace, counting from 1. Length is the number of existing characters to replace, not the ending position. The official entry demonstrates inserting a longer replacement and gives one numeric-input example.

Zoho specifically lists #VALUE! when start_position or length is less than zero. That statement does not settle zero, fractional or beyond-the-end inputs. The examples below use positive integers and positions within their stated strings.

Enter all eight original order records

Create TextOrders, reserving A1:M12. Put Raw_ID, Customer, Stage and Note in A1:D1 and enter the complete original data below in A2:D9. All four columns contain text. The records are fictitious; no separate download is required.

Row A: Raw_ID B: Customer C: Stage D: Note
2 CA_2026_0041 East Depot open Priority: CA_2026_0041
3 US_2026_0087 West Market closed Archive: US_2026_0087
4 CA_2025_0102 North Hub open Priority: CA_2025_0102
5 GB_2026_1042 South Shop hold Review: GB_2026_1042
6 CA_2026_0205 East Depot closed Archive: CA_2026_0205
7 US_2024_0130 West Market open Review: US_2024_0130
8 CA_2026_0420 Central Store hold Priority: CA_2026_0420
9 GB_2026_0011 North Hub closed Archive: GB_2026_0011

Preserve the underscores and leading zeros. Put results in separate columns, beginning at F, rather than replacing any source field.

Change separators and year fields in separate columns

Put First separator, Year changed, Both separators, Source length, Nested length and Same length in F1:K1. Enter these formulas in row 2, then fill F2:K2 through row 9:

F2: =REPLACE(A2;3;1;"-")
G2: =REPLACE(A2;4;4;"2030")
H2: =REPLACE(F2;8;1;"-")
I2: =LEN(A2)
J2: =LEN(H2)
K2: =I2=J2
Row F G H
2 CA-2026_0041 CA_2030_0041 CA-2026-0041
3 US-2026_0087 US_2030_0087 US-2026-0087
4 CA-2025_0102 CA_2030_0102 CA-2025-0102
5 GB-2026_1042 GB_2030_1042 GB-2026-1042
6 CA-2026_0205 CA_2030_0205 CA-2026-0205
7 US-2024_0130 US_2030_0130 US-2024-0130
8 CA-2026_0420 CA_2030_0420 CA-2026-0420
9 GB-2026_0011 GB_2030_0011 GB-2026-0011

I and J are 12 throughout; K is TRUE. H2 is also the result of the original nested formula =REPLACE(REPLACE(A2;3;1;"-");8;1;"-"). Separate helpers expose each stage without changing the input.

Reproduce the three direct vendor examples

Create LiteralRepairs, reserving A1:C6. Enter these formulas separately in B2:B4:

Cell Formula Expected result
B2 =REPLACE("Mick Foyd";6;4;"Floyd") Mick Floyd
B3 =REPLACE("abc2mail.com";4;1;"@") abc@mail.com
B4 =REPLACE(2020;4;1;1) 2021

The first replaces four characters with five, making the text one character longer. The last is Zoho’s particular numeric-input illustration; it does not define all date, decimal or formatted-number conversions.

Advanced: an earlier length change shifts later positions

Create ShiftedPositions, reserving A1:G6. Put CA_2026_0041, US_2026_0087 and CA_2025_0102 in A2:A4. Enter B2:G2 and fill through row 4:

B2: =REPLACE(A2;3;1;"--")
C2: =REPLACE(B2;8;1;"-")
D2: =REPLACE(A2;8;1;"-")
E2: =REPLACE(D2;3;1;"--")
F2: =LEN(C2)
G2: =LEN(E2)
Row B C: reused original offset E: later field changed first
2 CA–2026_0041 CA–202-_0041 CA–2026-0041
3 US–2026_0087 US–202-_0087 US–2026-0087
4 CA–2025_0102 CA–202-_0102 CA–2025-0102

F and G are 13 for all rows, although C has damaged a year digit. Replacing the earlier underscore with two hyphens shifts the later underscore from position 8 to 9. In this specific two-position edit, changing the later field first preserves both original offsets. It is not a universal substitute for checking a changing format.

Copy the original TextOrders as ChangedLayout and change A2 to CAN_2026_0041. F2 becomes CA-_2026_0041, showing that the fixed position changed the N rather than the underscore. The source length is now 13. Preserve the input and reconsider the layout rule instead of accepting a plausible-looking result.

LEN can reveal a changed width, while MID can expose the intended segment. Neither a matching length nor a formula without an error establishes that an identifier is valid.

Formula entry and scope

Use Zoho’s documented semicolon separators, straight double quotes around literal text and a leading equals sign. Check the formula bar and stored cell types if an imported field does not reproduce the small sample. Formula results belong in separate cells; they do not repair the original field in place.

The shared help error table includes general name, reference and argument-type problems. It is not a complete native error matrix for this function. Unicode segmentation, every mixed-type conversion, exact error propagation and cross-client file imports remain outside these explicit ASCII examples.