Text.ReplaceRange

 

This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.

Replaces length characters in a text value starting at a zero-based offset with the new text value.

Text.ReplaceRange(text as nullable text, offset as number, length as number, newText as text) as nullable text  

ArgumentDescription
textThe text to parse.
offsetThe beginning of the range.
lengthThe length of the range.
newTextThe replacement text.
Text.ReplaceRange("abcdef", 2, 3, "xyz") equals "abxyzf"  

Show: