From the course: Excel Formulas and Functions Quick Tips
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Change text with SUBSTITUTE and REPLACE - Microsoft Excel Tutorial
From the course: Excel Formulas and Functions Quick Tips
Change text with SUBSTITUTE and REPLACE
- [Narrator] The SUBSTITUTE function replaces text based on the content of the text. Everything that's 1099 in this column, I'd like to change to 1199. I'll use SUBSTITUTE. I'll select my range, put in a comma, add my old text, include another comma, and then put in my new text. I'll close the parentheses and everywhere there was a 1099 is now an 1199. Everything else remains unchanged. It can also replace specific instances of text. I need to update this last 20 with a 24, but I don't want to change both of them. I'll put in the cell, the old text, the new text, and now I'll use an optional parameter called instance number. I only want to change the second instance of a 20. We can also accomplish this using the REPLACE function. The REPLACE function changes text based on its position in the string. Once again, we're testing cell A2. This time, I'm replacing text seven positions over. I'm replacing two characters and I'm replacing them with the characters 23.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Format numbers and dates with TEXT2m 4s
-
(Locked)
Extract characters with LEFT AND RIGHT1m 20s
-
(Locked)
Extract substrings with MID56s
-
(Locked)
Count characters with LEN1m 7s
-
(Locked)
Identify where a character occurs with FIND1m 59s
-
(Locked)
Join strings with delimiters with TEXTJOIN1m 48s
-
(Locked)
Change text with SUBSTITUTE and REPLACE1m 55s
-
(Locked)
-
-
-