1. Home
  2. Functions
  3. Text
  4. REPLACEB
TextCompatibility

REPLACEB function

Same as REPLACE, counting bytes; without a double byte language set as default each character counts as one byte.

Syntax

=REPLACEB(old_text, start_num, num_chars, new_text)

Arguments

ArgumentRequiredDescription
old_textRequiredThe text to change
start_numRequiredPosition of the first character to replace
num_charsRequiredHow many characters to replace
new_textRequiredThe 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 "abcde*k"
=REPLACE("2009", 3, 2, "10")Result "2010"

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.