Home >Topics >excel >substitute function usage

substitute function usage

藏色散人
藏色散人Original
2019-06-19 10:56:053922browse

SUBSTITUTE is the cell formula function of Excel, not the 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!

substitute function usage

The following is the usage of the SUBSTITUTE function in Excel:

If you need to replace the specified text in a text string, you can Use the function SUBSTITUTE.

Syntax

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

Parameters

Text is the text in which the characters need to be replaced, or contains text The cell reference of The number of occurrences of old_text; if instance_num is specified, only old_text that meets the requirements will be replaced; if it is defaulted, all old_text that appears 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.

To view all available functions in VBA, you can click the Help menu in the VB window. The language reference inside contains detailed descriptions of all VBA functions, statements, properties, methods, objects, etc.

For more Excel-related technical articles, please visit the

Excel Basic Tutorial

column to learn!

The above is the detailed content of substitute function usage. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn