Power Query
published
Search
⌃K

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.
Text.Middle("Hello World", 6, 5)
"World"
Find the substring from the text "Hello World" starting at index 6 through the end.
Text.Middle("Hello World", 6, 20)
"World"