REPLACE Function (VisioShapeSheet)

Office 2013 and later

Last modified: March 09, 2015

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example

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

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

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.

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

Returns 01/03/2003.

Show: