Formualizer Docs
ReferenceFunctionsText Functions

MID

MID: Returns a substring starting at a 1-based position.

Summary

Returns a substring starting at a 1-based position.

Remarks

  • start_num is 1-based; values below 1 return #VALUE!.
  • num_chars must be non-negative; negatives return #VALUE!.
  • If start is beyond the end of the text, returns an empty string.
  • Non-text inputs are coerced to text.

Examples

Extract middle segment
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
reads
Start past end returns empty
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected

FAQ

How does MID handle out-of-range start positions?

If start_num is beyond the text length, MID returns an empty string.

Runtime metadata

Category

Text

Signature

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

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

Arity

min 3, max 1

Arguments

arg1

Any · Scalar

Caps

PURE

Source

On this page