{"id":1141,"date":"2018-07-01T14:55:09","date_gmt":"2018-07-01T14:55:09","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=1141"},"modified":"2023-11-03T14:08:01","modified_gmt":"2023-11-03T14:08:01","slug":"substitute","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/functions\/substitute\/","title":{"rendered":"SUBSTITUTE function"},"content":{"rendered":"\n
The SUBSTITUTE function in Excel allows you to replace specific text within a cell’s contents with new text. It’s a handy tool for making changes to your data without manually editing each cell.<\/p>\n\n\n\n
SUBSTITUTE(old_text, find_text, new_text, [instance_num])<\/strong><\/p>\n\n\n\n The SUBSTITUTE function is simple to use. Let’s go through some examples:<\/p>\n\n\n\n This formula replaces the first occurrence of “World” with “Universe” in the text “Hello, World!” resulting in “Hello, Universe!”.<\/p>\n\n\n\n This formula replaces all occurrences of “apples” with “bananas” in the text, giving you “bananas are red, bananas are green, bananas are delicious.”<\/p>\n\n\n\n Here, we specify that we want to replace the second occurrence of “green” with “purple,” resulting in “Blue and yellow make purple.”<\/p>\n\n\n\n Remember that the SUBSTITUTE function is not case-sensitive, so it will replace text regardless of letter case.<\/p>\n\n\n\n If you encounter a term you’re not familiar with, such as “function” or “formula,” you can find definitions and additional information on Excel functions on Microsoft’s Excel support site<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" The SUBSTITUTE function in Excel allows you to replace specific text within a cell’s contents with new text. It’s a handy tool for…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[180],"yoast_head":"\nArguments<\/h2>\n\n\n\n
old_text<\/strong><\/td> The original text containing the text you want to replace.<\/td><\/tr> find_text<\/strong><\/td> The text you want to find and replace within the old_text.<\/td><\/tr> new_text<\/strong><\/td> The new text that will replace the find_text in the old_text.<\/td><\/tr> [instance_num]<\/strong><\/td> (Optional) The instance number (default is 1) specifying which occurrence of the find_text to replace in old_text. If omitted, all occurrences are replaced.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n How to use<\/h2>\n\n\n\n
=SUBSTITUTE(\"Hello, World!\", \"World\", \"Universe\")<\/code><\/pre>\n\n\n\n
=SUBSTITUTE(\"Apples are red, apples are green, apples are delicious.\", \"apples\", \"bananas\")<\/code><\/pre>\n\n\n\n
=SUBSTITUTE(\"Blue and yellow make green.\", \"green\", \"purple\", 2)<\/code><\/pre>\n\n\n\n