Power Query
Search…
Text.Middle

Text.Middle

Returns the substring up to a specific length.
function (optional text as nullable any, start as number, optional count as nullable any) as nullable any

Description

Returns count characters, or through the end of text; at the offset start.

Category

Text.Extraction

Examples

Find the substring from the text "Hello World" starting at index 6 spanning 5 characters.
1
Text.Middle("Hello World", 6, 5)
Copied!
"World"
Find the substring from the text "Hello World" starting at index 6 through the end.
1
Text.Middle("Hello World", 6, 20)
Copied!
"World"