Replacing Strings (REPLACE)

Syntax: REPLACE(Old_Text; Start_Number; Number_of_Chars; New_Text)

This function replaces part of a string old_text with a new string new_text, as in

=REPLACE("OpenOffice.org"; 5; 10; "Calc")

which returns OpenCalc.

images

Figure 10-5. Sample result of the REPLACE function

The two numeric arguments (start_number and number_of_chars) are the position where the replacement ought to begin and the number of characters that are to be replaced.

Get Beginning OpenOffice Calc: From Setting Up Simple Spreadsheets to Business Forecasting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.