Formualizer Docs
ReferenceFunctionsText Functions

REPLACE

Replaces part of a text string by position.

Summary

REPLACE(old_text, start_num, num_chars, new_text) works by character index.

Remarks

  • start_num is 1-based and must be at least 1.
  • num_chars must be non-negative.
  • If start is beyond the end, the original text is returned unchanged.
  • Non-text inputs are coerced to text.

Examples

Replace middle segment
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
abZZef
Insert at start
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
Q1-report

FAQ

Does REPLACE match text patterns?

No. REPLACE is position-based and replaces by start_num and num_chars, not by searching old text.

Runtime metadata

Category

Text

Signature

REPLACE(arg1, arg2, ... argN: Any)

This function accepts a repeating argument pattern (min args: 4).

Arity

min 4, max 1

Arguments

arg1

Any · Scalar

Caps

PURE

Source

On this page