Syntax
=REPLACEB(old_text, start_num, num_chars, new_text)Arguments
| Argument | Required | Description |
|---|---|---|
old_text | Required | The text to change |
start_num | Required | Position of the first character to replace |
num_chars | Required | How many characters to replace |
new_text | Required | The text to put in |
How to use REPLACEB
REPLACEB is kept so older workbooks keep working. It calculates the same way as REPLACE, which is the name to use in new formulas.
REPLACEB takes 4 required arguments. Type =REPLACEB( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=REPLACE("abcdefghijk", 6, 5, "*")Result =REPLACE("2009", 3, 2, "10")Result Related text functions
- REGEXMATCHChecks whether any part of a text matches a regular expression pattern (case sensitive).
- REGEXREPLACEReplaces the parts of a text that match a regular expression pattern.
- REGEXTESTChecks whether any part of a text matches a regular expression pattern.
- REPLACEReplaces part of a text, given a start position and a number of characters, with other text.
- REPTRepeats text a given number of times.
- RIGHTReturns the last characters of a text.
- RIGHTBSame as RIGHT, counting bytes; without a double byte language set as default each character counts as one byte.
- SEARCHReturns the position of one text inside another, ignoring case. Accepts the wildcards ? and *.
- SEARCHBSame as SEARCH, counting bytes; without a double byte language set as default each character counts as one byte.