Text.RemoveRange

This function returns a new text value that excludes the characters starting from the specified offset position. You can also specify an optional parameter, count, to indicate the number of characters...

Syntax

Text.RemoveRange(text as nullable text, offset as number, optional count as nullable number) as nullable text

About

This function returns a new text value that excludes the characters starting from the specified offset position. You can also specify an optional parameter, count, to indicate the number of characters to be removed. The default value for count is 1. Note that position values begin at 0.

Explanation

Example 1 Eliminate one character from the text "ABEFC" located at position 2. Instructions: Apply Power Query MText.RemoveRange("ABEFC", 2) Result: The output will be "ABFC". Example 2 Take away two characters from the text "ABEFC" beginning at position 2. Instructions: Use Power Query MText.RemoveRange("ABEFC", 2, 2) Result: You will get "ABC" as the output.