You are here: Features > Cell Functions > Text Functions > SUBSTR function

SUBSTR Function

The SUBSTR function selects a portion of a specified string (text) to display beginning at a selected distance from the left of the string (count) for as many characters are specified (length) into the string. The length parameter is optional. If length is not supplied, the function returns all remaining characters. This function is only applicable for alphanumeric cells.

Syntax

SUBSTR(text, count, <length>)

Example 1

SUBSTR("Prince Edward Island",8)

Where 8 characters into the string is the E of Edward. Therefore the cell displays Edward Island.

Example 2

SUBSTR("Prince Edward Island", 8, 6)

Where 8 characters into the string is the E of Edward and 6 characters from the E of Edward is the last D of Edward. Therefore the cell displays Edward.

Related Topics