REPLACE Function (VisioShapeSheet)

Replaces part of a text string, based on the number of characters you specify, with a different text string.

Syntax

REPLACE (old_text, start_num, num_chars, new_text )

Parameters

Name Required/Optional Data Type Description
old_text
Required
String
The text in which you want to replace some characters.
start_num
Required
Number
The position of the character in old_text that you want to replace with new_text. The first character in the string is position 1.
num_chars
Required
Number
The number of characters in old_text that you want to replace
new_text
Required
String
The text that will replace characters in old_text.

Return value

String

Remarks

Use the REPLACE function when you want to replace text that occurs in a specific location in a text string. If you want to replace specific text in a text string, use the SUBSTITUTE function.

Example

REPLACE ("01/03/2002",9,2,"03")

Returns 01/03/2003.