ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Functions > Excel SUBSTITUTE Function

Excel SUBSTITUTE Function

How to Use the Excel SUBSTITUTE Function
Table of contents :
  • What is the Excel SUBSTITUTE Function?
  • SUBSTITUTE Syntax
  • How to Use SUBSTITUTE Function in Excel
  • Difference between SUBSTITUTE and REPLACE in Excel
  • SUBSTITUTE Example

Excel SUBSTITUTE Function

What is the Excel SUBSTITUTE Function?

The excel SUBSTITUTE function replaces the old text to the new text by matching the same word. The SUBSTITUTE function works in case sensitive and has no support for a wildcard character.

SUBSTITUTE Syntax

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

text, required, the text for which you want to change.

old_text, required, the text to replace.

new_text, required, the text to replace with.

instance_num, optional, which old_text occurrence you want to replace with new_text. If omitted, Excel replaces every occurrence of old_text to new_text.

How to Use SUBSTITUTE Function in Excel

The following is an example of the SUBSTITUTE function usage and the results.

Excel SUBSTITUTE Function

SUBSTITUTE Function #1

=SUBSTITUTE(A2,B2,C2)

The instance_num argument is optional; if you omit the argument, then excel replaces all “g” letters to “d” letter.

The result is a doodle.

SUBSTITUTE Function #2

=SUBSTITUTE(A3,B3,C3,D3)

If you put number 1 in instance_num argument, then excel only replace the first “g” letter and ignores all the “g” letters afterward.

The result is doogle.

SUBSTITUTE Function #3

=SUBSTITUTE(A4,B4,C4)

There are two “the” words, first at the beginning of the sentence with the large “T” letter. Second in the middle of the sentence with all lowercase letters.

The SUBSTITUTE function works in case sensitive, replace only the word with the same letter. Excel replaces the second “the” word.

The result is The Quick Brown Fox Jumps Over a Lazy Dog.

SUBSTITUTE Function #4

=SUBSTITUTE(A5,B5,C5)

There is no “THE” (all uppercase) word, the result has nothing to change, just like the text in cell A5.

SUBSTITUTE Function #5

=SUBSTITUTE(A6,B6,C6,D6)

The SUBSTITUTE function has no support for wildcard character. If there are “?” (question mark) or “*” (asterisk) character, Excel considers as “ordinary” character instead of a wildcard character.

There is no “g???” word in cell A6, the results remain unchanged, like the text in cell A6.

Difference between SUBSTITUTE and REPLACE in Excel

Besides the SUBSTITUTE function, Excel has another function to change the text, namely the REPLACE function. What is the difference between the SUBSTITUTE function and the REPLACE function?

The SUBSTITUTE function changes the text based on the specified word, while the REPLACE function changes the text based on the specified position.

If you know the word to be changed, use the SUBSTITUTE function. If you know the position of the text to be changed, use the REPLACE function.

For a more detailed explanation of the Excel REPLACE function, please read the following article:

  • How to Use the Excel REPLACE Function

SUBSTITUTE Example

Another article using or explain about SUBSTITUTE Function
  • Add and Remove Leading Zeros in Excel

Another Text Function

Another article about Text Function
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
Usefull links
  • Microsoft SUBSTITUTE function documentation
Share
Tweet
Google+
Email
Prev Article
Next Article

Related Articles

Excel SUBTOTAL Function
What is the Excel SUBTOTAL Function? The Excel SUBTOTAL function …

Excel SUBTOTAL Function

Excel TIME Function
What is the Excel TIME Function? The Excel TIME function …

Excel TIME Function

Excel REPLACE Function
What is the Excel REPLACE Function? The excel REPLACE function …

Excel REPLACE Function

Excel DAY Function
What is the Excel DAY Function? The DAY function returns …

Excel DAY Function

Excel AVERAGEIF Function
What is the Excel AVERAGEIF Function? The Excel AVERAGEIF function …

Excel AVERAGEIF Function

Tags:Difference Between Substitute and Replace in Excel Excel Substitute Excel Substitute Multiple How to Substitute in Excel How to Use Substitute Formula in Excel How to Use Substitute Function in Excel How to Use Substitute in Excel Substitute Formula in Excel Text Functions

Categories

  • Excel 101
  • Excel Formula
  • Excel Functions

Recent Posts

  • Get the Original Price from Percentage Increase/Decrease
  • How to Add/Subtract Percentage in Excel
  • How to Extract Day, Month and Year from Date in Excel
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Add Days, Weeks, Months and Years to a Date in Excel
  • How to Calculate Time Difference in Excel
  • Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel
  • Flash Fill Excel
  • Paste Special Excel
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
  • Excel LEFT Function

ExcelCSE.com

The Ultimate Guide How to Use Excel Better
Copyright © 2024 ExcelCSE.com
Contact Us - Privacy Policy - Sitemap | Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh