Microsoft Office Tutorials and References
In Depth Information
Syntax
For example, =SUBSTITUTE("Sales Data","Sales","Cost") would generate
Cost Data .
The SUBSTITUTE function works similarly to a traditional find-and-re-
place command. Compared to the SUBSTITUTE function, the REPLACE function
is difficult enough to make even an old programmer s head spin.
Syntax
=REPLACE(old_text,start_num,num_chars,new_text)
Tip
To successfully use REPLACE, you must use functions to determine
the location and number of characters to replace. In most circum-
stances, SUBSTITUTE is easier to use.
REPLACE replaces part of a text string, based on the number of characters
specified, with a different text string. This function takes the following ar-
guments:
old_text
old_text This is text in which you want to replace some characters.
start_num
start_num This is the position of the character in old_textthat
you want to replace with new_text.
num_chars
num_chars This is the number of characters in old_textthat you
want REPLACE to replace with new_text.
new_text
new_text This is the text that will replace characters in old_text.
Using
Using REPT
to Repeat Text Multiple Times
The REPT function repeats a character or some text a certain number of times.
REPT to Repeat Text Multiple Times
Syntax
=REPT(text,number_times)
The REPT function repeats text a given number of times. You use REPT to fill
a cell with a number of instances of a text string. This function takes the
following arguments:
text
text This is the text you want to repeat.
Search JabSto ::




Custom Search