How to use substitute function
Replace old_text with new_text in the text string. If you need to replace specified text in a text string, use the function SUBSTITUTE.
SUBSTITUTE is an Excel cell formula function, not an internal function of VBA. These two concepts must be clearly distinguished. Although there are many functions with the same name and similar usage, they are essentially different! The following is how the SUBSTITUTE function is used in Excel:
Syntax
SUBSTITUTE(text,old_text,new_text,[instance_num])
Text is not omitted parameter. The text whose characters need to be replaced, or a reference to the cell containing the text.
Old_text does not omit parameters. is the old text that needs to be replaced.
New_text does not omit parameters, but has a default value of empty. Text to replace old_text.
Instance_num is a numerical value used to specify how many occurrences of old_text to replace with new_text. If instance_num is specified, only old_text that meets the requirements will be replaced; if it is defaulted, all occurrences of old_text in TEXT will be replaced with new_text.
Example
If A1=the revolution of learning, A2=computer
Then the formula=SUBSTITUTE(A1,"the revolution",A2,1 )
Return to "Learning Computers"
To view all available functions in Excel, you can click the "fx" icon on the left side of the Excel edit bar, which contains descriptions of all functions.
For more Excel-related technical articles, please visit the Excel Basic Tutorial column to learn!
The above is the detailed content of How to use substitute function. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



This article will guide you through the process of creating a timeline for Excel pivot tables and charts and demonstrate how you can use it to interact with your data in a dynamic and engaging way. You've got your data organized in a pivo

This tutorial demonstrates how to efficiently locate the top N values within a dataset and retrieve associated data using Excel formulas. Whether you need the highest, lowest, or those meeting specific criteria, this guide provides solutions. Findi

Mastering Google Sheets Sorting: A Comprehensive Guide Sorting data in Google Sheets needn't be complex. This guide covers various techniques, from sorting entire sheets to specific ranges, by color, date, and multiple columns. Whether you're a novi

This tutorial shows you how to add dropdown lists to your Outlook email templates, including multiple selections and database population. While Outlook doesn't directly support dropdowns, this guide provides creative workarounds. Email templates sav

This guide shows you two easy ways to enable email templates in Gmail: using Gmail's built-in settings or installing the Shared Email Templates for Gmail Chrome extension. Gmail templates are a huge time-saver for frequently sent emails, eliminating

Wouldn't it be convenient if you could compose an email now and have it sent at a later, more opportune time? With Outlook's scheduling feature, you can do just that! Imagine that you are working late at night, inspired by a brilliant ide

In this tutorial, you'll learn how to use regular expressions in Excel to find and extract substrings matching a given pattern. Microsoft Excel provides a number of functions to extract text from cells. Those functions can cope with most

This tutorial demonstrates several methods for separating text and numbers within Excel cells, utilizing both built-in functions and custom VBA functions. You'll learn how to extract numbers while removing text, isolate text while discarding numbers
