tech on the net
Home About Us Feedback Site Map

Microsoft

Access Excel Word

Database

SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker

Language

C Language

More

ASCII Table Linux UNIX Java Clipart Joke of the Moment

Excel Functions

(Scroll to see more)

Share this page:

MS Excel: SUBSTITUTE Function (WS)

Learn how to use the Excel SUBSTITUTE function with syntax and examples.

Description

The Microsoft Excel SUBSTITUTE function replaces a set of characters with another.

Syntax

The syntax for the Microsoft Excel SUBSTITUTE function is:

SUBSTITUTE( text, old_text, new_text, [nth_appearance] )

Parameters or Arguments

text is the original string to use to perform the substitution.

old_text is the existing characters to replace.

new_text is the new characters to replace old_text with.

nth_appearance is optional. It is the nth appearance of old_text that you wish to replace. I f this parameter is omitted, then every occurrence of old_text will be replaced with new_text.

Applies To

The SUBSTITUTE function can be used in the following versions of Microsoft Excel:

  • Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Excel Function

The SUBSTITUTE function can be used in Microsoft Excel as the following type of function:

  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel SUBSTITUTE function examples and explore how to use the SUBSTITUTE function as a worksheet function in Microsoft Excel:

Microsoft Excel

Based on the spreadsheet above, the following Excel SUBSTITUTE examples would return:

=SUBSTITUTE(A1, "bet", "con", 1) would return "Alphacon soup"
=SUBSTITUTE(A2, "t", "4", 2) would return "techon4henet.com"
=SUBSTITUTE(A2, "t", "4") would return "4echon4hene4.com"